//SORT01 EXEC PGM=SORT
//SORTJNF1 DD DSN=MASTER.FILE,DISP=SHR
//SORTJNF2 DD DSN=TRANS.FILE,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORTJNF1 and SORTJNF2 do not need to be in the same format. Let's assume for this example that MASTER.FILE has the following fields:
Field | Position | Length |
Account # Account Name Address Phone # Total Txn | 1 6 26 56 63 | 5 20 30 7 6 |
Field | Position | Length |
Trans ID Account # Trans Date Txn Amount | 1 6 11 21 | 5 5 10 6 |
JOINKEYS FILES=F1,FIELDS=(1,5,A)
JOINKEYS FILES=F2,FIELDS=(6,5,A)
REFORMAT FIELDS=(F1:1,5, Account#
F2:11,10, Transaction Date
21,6) Transaction Amount
SORT FIELDS=COPY
No comments:
Post a Comment