Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a one step DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/10)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=... output file (FB/10)
//TOOLIN DD *
SELECT FROM(IN) TO(T1) ON(1,6,CH) FIRST(3) -
USING(CTL1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
INREC OVERLAY=(11:SEQNUM,8,ZD)
SORT FIELDS=(1,6,CH,A,11,8,ZD,D)
/*
//CTL2CNTL DD *
SORT FIELDS=(1,6,CH,A,11,8,ZD,A)
OUTREC BUILD=(1,10)
/*
|
|
|
sandy0407
New User
Joined: 01 Aug 2010 Posts: 7 Location: Morley
|
|
|
|
Thanks Frank. I used the same logic but in 3 different steps.
However, I had faced problems while using temporary file as the input file was very large (about 7 million records). We increased the number of cylinders of the temp dataset but the job was still failing due to space abend.
When we hard coded the intermediate file (replaced the temporary file with an emplty file created in other step) and then passed it to the subsequent steps , the problem was resolved. |
|