Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Thu May 31, 2007 11:04 am Post subject: |
|
|
Here's a DFSORT job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&IN,DISP=(OLD,PASS)
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//OUT3 DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),
OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=NONE,
OVERLAY=(89:SEQNUM,8,ZD,
81:81,8,ZD,SUB,89,8,ZD,M11,LENGTH=8))
OUTFIL FNAMES=OUT1,INCLUDE=(81,8,ZD,EQ,+1),BUILD=(1,80)
OUTFIL FNAMES=OUT2,INCLUDE=(81,8,ZD,EQ,+2),BUILD=(1,80)
OUTFIL FNAMES=OUT3,INCLUDE=(81,8,ZD,EQ,+3),BUILD=(1,80)
|
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|