Code: |
INPUT | OUTPUT RECORDS | RECORDS 111 AAA | 111 AAA 111 CCC | 111 BBB 111 BBB | 111 CCC 222 AAA | 222 AAA 222 CCC | 222 BBB 222 BBB | 222 CCC 333 AAA | 333 AAA 333 CCC | 333 BBB 333 DDD | 333 CCC 333 BBB | 333 DDD 444 AAA | 444 AAA 444 DDD | 444 BBB 444 RRR | 444 DDD 444 WWW | 444 RRR 444 BBB | 444 WWW 111 AAA | 111 AAA 111 DDD | 111 BBB 111 BBB | 111 DDD 222 AAA | 222 AAA 222 ZZZ | 222 BBB 222 BBB | 222 ZZZ 333 AAA | 333 AAA 333 CCC | 333 BBB 333 DDD | 333 CCC 333 BBB | 333 DDD 444 AAA | 444 AAA 444 DDD | 444 BBB 444 ZZZ | 444 DDD 444 WWW | 444 WWW 444 BBB | 444 ZZZ |
Code: |
//S1 EXEC PGM=ICEMAN //SYSOUT DD SYSOUT=* //SORTIN DD DSN=... input file (FB/80) //SORTOUT DD DSN=... output file (FB/80) //SYSIN DD * INREC IFTHEN=(WHEN=INIT, OVERLAY=(81:SEQNUM,8,ZD,97:SEQNUM,8,ZD,RESTART=(1,3))), IFTHEN=(WHEN=(97,8,ZD,EQ,+1), OVERLAY=(81:SEQNUM,8,ZD)), IFTHEN=(WHEN=NONE, OVERLAY=(89:SEQNUM,8,ZD, 81:81,8,ZD,SUB,89,8,ZD,M11,LENGTH=8)) SORT FIELDS=(81,8,ZD,A,9,3,CH,A) OUTREC BUILD=(1,80) /* |
Quote: |
sort key is different for different record type. |
Quote: |
one more is, I would not like to sort some of the records types as I dont need them to sort. Hcen i would like to skip the sorting for the same to save the time. eg: I dont want to sort the records types 333. Is it possible? |
Code: |
SORT FIELDS=(81,8,ZD,A,10,20,CH,A) |
Quote: |
Assume some random fields for sort keys, but with different values for different record types, as I am yet to freeze the sort fields. We are working on the sorting keys currently. |
output generated using printer-friendly topic mod. All times are GMT - 5 Hours