krsenthil85
New User
Joined: 31 Aug 2007 Posts: 55 Location: bangalore
|
|
|
|
I have two input files File A (LRECL 100, KEY - 13,14) and File B (LREC 124, KEY - 6,14)
Compare File A and File B, if the records are found in both files Write the record from File A to output file and update the 58th position as 'B'
If the record from File A not Present in File B, just copy the record from FileA to Output file without any change.
Please let me know the sort card step for this.
Thanks,
Senthil. |
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Try the following SyncSort for z/OS JOIN application:
Code: |
//SORT1 EXEC PGM=SORT
//SORTJNF1 DD DSN=FILE1
//SORTJNF2 DD DSN=FILE2
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(13.14,A)
JOINKEYS FILE=F2,FIELDS=(6,14,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,100,F2:1,1)
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(101,1,CH,NE,C' '),BUILD=(1,57,C'B',59,42)),
IFTHEN=(WHEN=NONE,BUILD=(1,100))
/* |
|
|