I have the below requirement to merge two files laterally.
File details
File A - FB, 80, No of fields - 7, Key field is at position 1 to 8, the file sorted on key field.
File B - FB, 80, No of fields - 3, Key field is at position 1 to 8, the file sorted on key field.
Expected Output file ( The output should contains all the records in file A, If file B Key column has any match with File A key column, then the corresponding details has to be appended at the end of File A)
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Craig,
Since both input files are of the same lrecl and recfm , we really don't have to use splice to get the desired results. We can use the new function when=group to push the contents of file2 on to file 1 record
Use the following DFSORT JCL. We concatenate 1 line record with HDR before each file so as to identify as to which file the record came from.