Reputation: 51
I have an input KSDS file, i am using emp-id as primary key and emp-dept as alternate key, with access mode as dynamic. I am reading the file using dynamic access base upon the alternate key, in runjcl i am using base ksds file and ksds path file, so normally cobol will read from the path file (which is sorted based upon the alternate key not the primary key).
but problem is while i am writing to an output ksds it is showing file status 21 error, because in ksds record can only be inserted if it is sorted based upon the primary key, so what to do? is there any other alternate method??
Upvotes: 0
Views: 583
Reputation: 10543
Why not
If updating an existing file, you should be able to update the file. Alternatively you can always use 2 programs and sort the output from the first program.
Does the output file really need to be a VSAM file ???.
Upvotes: 2