kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Wed Jun 07, 2006 2:51 pm Post subject: |
|
|
Bprasanna,
If you have SYNCSORT FOR Z/OS 1.2.1.1R then the following JCL will give you the desired results.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAAAAAA BBBBBBBB
AAAAAAA CCCCCCCC
AAAAAAA DDDDDDDD
BBBBBBB CCCCCCCC
CCCCCCC DDDDDDDD
CCCCCCC EEEEEEEE
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,7))
OUTFIL IFOUTLEN=80,
IFTHEN=(WHEN=(81,8,ZD,GT,1),
OVERLAY=(1:7X))
/*
|
If you get an error with the above job, you can try this job.
Code: |
//STEP0200 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
AAAAAAA BBBBBBBB
AAAAAAA CCCCCCCC
AAAAAAA DDDDDDDD
BBBBBBB CCCCCCCC
CCCCCCC DDDDDDDD
CCCCCCC EEEEEEEE
//UNQ DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//DUP DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//CON DD DSN=&T1,VOL=REF=*.UNQ,DISP=OLD
// DD DSN=&T2,VOL=REF=*.DUP,DISP=OLD
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(UNQ) ON(1,7,CH) FIRST DISCARD(DUP) USING(CTL1)
SORT FROM(CON) USING(CTL2)
//CTL1CNTL DD *
OUTREC FIELDS=(1,80,SEQNUM,8,ZD)
OUTFIL FNAMES=UNQ,
OUTREC=(1,88)
OUTFIL FNAMES=DUP,
OUTREC=(7X,8,81)
//CTL2CNTL DD *
SORT FIELDS=(81,8,CH,A)
OUTFIL FNAMES=OUT,
OUTREC=(1,80)
/*
|
If that gives you an error then try this job
Code: |
//STEP0300 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
AAAAAAA BBBBBBBB
AAAAAAA CCCCCCCC
AAAAAAA DDDDDDDD
BBBBBBB CCCCCCCC
CCCCCCC DDDDDDDD
CCCCCCC EEEEEEEE
//T1 DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//CTL1XSUM DD DSN=&T2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//CON DD DSN=&T1,DISP=OLD,VOL=REF=*.T1
// DD DSN=&T2,DISP=OLD,VOL=REF=*.CTL1XSUM
//OUT DD SYSOUT=*
//TOOLIN DD *
SORT FROM(IN) USING(CTL1)
SORT FROM(CON) USING(CTL2)
//CTL1CNTL DD *
INREC FIELDS=(1,80,7X,8,73,SEQNUM,8,ZD)
SORT FIELDS=(01,07,CH,A)
SUM FIELDS=NONE,XSUM
OUTFIL FNAMES=T1,
OUTREC=(1,80,1,7,88,81)
//CTL2CNTL DD *
INREC FIELDS=(81,88)
SORT FIELDS=(81,8,CH,A)
OUTFIL FNAMES=OUT,OUTREC=(1,80)
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|