The 0102 records should output 3 records per 1 records of input. The 0203 record should output 1 record per 1 record of input. The output should be an 80 byte record. I have defined the COMBINE DD statement as FB,80,27920.
Code:
AU IS2394
RE IS2394 GROUP(#TSUSER )
DU IS2394
AU $1XXX
RE $1XXX GROUP(CICS010 )
DU $1XXX
CO PXCH3 GROUP(CICS647 )
AU IS2394
RE IS2394 GROUP(DFLTGRP1)
DU IS2394
AU IS2394
RE IS2394 GROUP(QKMTBR )
DU IS2394
Here are the ICETOOL control cards I am attempting to use:
Code:
SORT FIELDS=COPY
OUTFIL FNAMES=COMBINE,IFOUTLEN=80,
IFTHEN=(WHEN=(18,4,CH,EQ,C'0203'),
BUILD=(1:C' CO ',5:8,10,13:C' GROUP(',20:8,1,28:C')',
29:52C' ')),
IFTHEN=(WHEN=(18,4,CH,EQ,C'0102'),
BUILD=(1:C' AU ',5:8,10,13:68C' ',/,
1:C' RE ',5:8,10,13:C' GROUP(',20:8,1,28:C')',29:52C' ',/,
1:C' DU ',5:8,10,13:68C' '))
Here is the error message I am receiving.
Code:
ICE146I 0 END OF STATEMENTS FROM CTL3CNTL - PARAMETER LIST STATEMENTS FOLLOW
DEBUG NOABEND,ESTAE
OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL3,SORTIN=TEMP2
SORTOUT=COMBINE,DYNALLOC
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE126A 9 INCONSISTENT COMBINE IFTHEN 2 REFORMATTING FIELD FOUND
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
ICE052I 3 END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
The error message is issued because you have overlapping output fields. For example:
BUILD=(1:C' AU ',5:8,10,13:68C' ',/
The second field starts at position 5 and ends at position 14, but you have 13: for the next output field which overlaps the previous field. It looks like you reversed the starting position and length for the second field - you specified 8,10 when you really wanted 10,8. You reversed 1,8 to 8,1 as well.
Here are simplied DFSORT control statements that will do what you want:
Code:
SORT FIELDS=COPY
OUTFIL FNAMES=COMBINE,IFOUTLEN=80,
IFTHEN=(WHEN=(18,4,CH,EQ,C'0203'),
BUILD=(1:C' CO ',5:10,8,13:C' GROUP(',20:1,8,28:C')')),
IFTHEN=(WHEN=(18,4,CH,EQ,C'0102'),
BUILD=(1:C' AU ',5:10,8,/,
1:C' RE ',5:10,8,13:C' GROUP(',20:1,8,28:C')',/,
1:C' DU ',5:10,8))