kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Oct 13, 2010 12:47 pm Post subject: |
|
|
arvibala,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//INA DD DSN=Your File with header detailed and trailer records,DISP=SHR
//INB DD DSN=Your MSGID file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=INA,FIELDS=(201,08,A),SORTED,NOSEQCK
JOINKEYS F2=INB,FIELDS=(201,08,A),SORTED,NOSEQCK
JOIN UNPAIRED
REFORMAT FIELDS=(F1:1,200,?,F2:1,36)
OUTFIL IFOUTLEN=200,
IFTHEN=(WHEN=(201,1,CH,EQ,C'B'),OVERLAY=(30:202,36))
//JNF1CNTL DD *
INREC OVERLAY=(201:SEQNUM,8,ZD)
//JNF2CNTL DD *
OPTION STOPAFT=1
INREC OVERLAY=(201:SEQNUM,8,ZD)
//* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|