kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Sep 01, 2009 9:56 am Post subject: |
|
|
nbdtrjk1,
The following DFSORT/ICETOOL JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DUMMY,DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920)
//SORTOUT DD DSN=&&H,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FTOV,REMOVECC,HEADER1=(C'HDR',80:X)
//*
//STEP0200 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&H,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT
// DD DSN=your UNQ vb 756 lrecl file,DISP=SHR
// DD DSN=&&H,DISP=SHR,VOL=REF=*.STEP0100.SORTOUT
// DD DSN=your DUPS vb 710 lrecl file,DISP=SHR
//T1 DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE),LRECL=718
//OUT DD SYSOUT=*
//TOOLIN DD *
SORT FROM(IN) USING(CTL1)
SORT FROM(T1) USING(CTL2)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,45X,5)),
IFTHEN=(WHEN=GROUP,BEGIN=(50,3,CH,EQ,C'HDR'),PUSH=(5:ID=1,7:SEQ=8)),
IFTHEN=(WHEN=(5,1,ZD,EQ,1),OVERLAY=(23:52,27)),
IFTHEN=(WHEN=(5,1,ZD,EQ,2),OVERLAY=(23:58,27))
SORT FIELDS=(23,27,CH,A),EQUALS
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(15:SEQNUM,8,ZD,RESTART=(23,27))),
IFTHEN=(WHEN=GROUP,BEGIN=(15,8,ZD,EQ,1),PUSH=(6:5,1))
OUTFIL FNAMES=T1,INCLUDE=(5,2,ZD,EQ,21),BUILD=(1,4,7,8,50)
//CTL2CNTL DD *
SORT FIELDS=(5,8,CH,A)
OUTFIL FNAMES=OUT,BUILD=(1,4,13)
/* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|