Hi,
I'm trying to update a program described file.
I setup the F specs to allow processing by key
I then coded a DS as the key with a field defined as 8 bytes to match the "F" spec
I also have an update DS
When the program runs I open the file and chain using the KEYDS
I update the values in the UPDDS with a chain to another file to get a value and then the SFL to get what's on screen, then try to update the record but I get CPF5149 at the KEYDS chain which, basically informs me that the operation for the file is not valid!
What am I doing wrong?
Ah, an indexed file requires DDS, don't have any. It's just a flat file created in a cl before this pgm is called. Need to find another way.
I'm trying to update a program described file.
I setup the F specs to allow processing by key
Code:
FFMYFILE1 UF F 32 8AI 1 DISK A UC
Code:
IKEYDS DS I 1 8 MYFLD1
Code:
IUPDDS DS I 5 12 FLD1 I 13 30 FLD2 I 32 32 FLD3
Code:
C OPEN FMYFILE1 C MOVELMYFLD1 $$FLD1 25 C $$FLD1 CHAINFMYFILE2 99 C KEYDS CHAINFMYFILE1 UPDDS 99 C @SFL1R CHAINSFL1 99 C MOVELMYFLD2 FLD2 C MOVELMYFLD1 FLD1 C UPDATFMYFILE1 UPDDS C CLOSEFMYFILE1
What am I doing wrong?
Ah, an indexed file requires DDS, don't have any. It's just a flat file created in a cl before this pgm is called. Need to find another way.





Comment