I have an input file with a few records. I need to search these records in an VSAM file one by one and if I find a matching record, then I need to update a field of that record in VSAM file with a fixed msg 'XXX'.
I am trying to avoid writing a new Cobol pgm for the above function. I'm not sure if it is possible using SYNCTOOL utility.
Matching what? Matching a particular constant? Matching another field in the record? You need to explain clearly what it is you're trying to do.
Show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of all relevant fields.
Are all of the VSAM records the same length and can they be different lengths?
You need to do this in 2 steps.
1) JOIN the flat file and VSAM file on keys and update the required field. This can be done using SPLICE.
2) Use the o/p of step 1 as input in this step. You can do REPRO REPLACE to your original vsam file. All the updated key recs will be reflected in your VSAM file.
You can use the below job to JOIN both the files. I am assuming that key of VSAM file also start at pos 1 and is of 14 chars.
Thanks for the reply. I tried using your method but the JCL failed with U0016 abend code. It failed in the statement:
The cause of the failure was explained as follows:
SyncSort was invoked by another program, and that program used a 31-bit parameter list where the "call identifier" parameter
was specified. xxxx is the identifier specified by the calling program.