Apart from getting the matching records, I need to replace the data from 202 column to 216 (length=15) of second file to 192 position of first file.
Also, replace the data from 217 column (15 length) of second file to 207 position of first file.
And also, replace the data from 232 column (15 length) of second file to 177 position of first file in the matched common output file.
It would be really great if someone can provide me with the JCL which does the above functionality.
Kindly let me know incase more information is needed.
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
As you have posted in the JCL section of the forum I presume you want the SYNCSORT JCL. This is described in the SYNCSORT manual or you could simply look at the JCL used by other sort executions in your shop.
But...JCL cannot do what you are wanting - it will only tell the OS what program you want run and what resources it needs.
To get Syncsort to do what you want you have to give it control 'cards' which you should find in the Syncsort manual. You will also find examples throughout the JCL part of the forum and you may find that the DFSort equivalent will also work.
Yes, I am speaking about JOIN KEYS in SORT utility. I could get the matching records based on the keys as mentioned above. This, I could do using the example posted in the forum.
However, I could not find any example related to replacing the data from the 2nd file into 1st file based on the fields of the matched file which is obtained from JOIN KEYS SORT.
If you can let me know the syntax to include these conditions(Replacing the data) in JOIN KEYS, It would be really helpful to me.