Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Narismha,
You can't sort on different keys in one sort step, but you can do it in one DFSORT/ICETOOL step, although it will take 4 passes over the input file. Here's an example:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT1 DD DSN=... output file1
//OUT2 DD DSN=... output file2
//OUT3 DD DSN=... output file3
//OUT4 DD DSN=... output file4
//TOOLIN DD *
SORT FROM(IN) TO(OUT1) USING(CTL1)
SORT FROM(IN) TO(OUT2) USING(CTL2)
SORT FROM(IN) TO(OUT3) USING(CTL3)
SORT FROM(IN) TO(OUT4) USING(CTL4)
/*
//CTL1CNTL DD *
SORT FIELDS=(1,10,CH,A)
/*
//CTL2CNTL DD *
SORT FIELDS=(11,10,CH,A)
/*
//CTL3CNTL DD *
SORT FIELDS=(21,10,CH,A)
/*
//CTL4CNTL DD *
SORT FIELDS=(31,10,CH,A)
/*
|
|
|