I have an input file and have to split it as per a condition at position 7(if CD='PER' and 'PEN)
and have to add a new field at the 15th position.
I tried to do this with ICETOOl but it abends. Can you please let me know the error in the jcl I have written.
The record length of the input file is 52.
The JCL that I have written is :
ICE000I 0 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 07:46 ON TUE JAN
OUTFIL FNAMES=OUT1,
INCLUDE=(07,3,CH,EQ,C'PEN'),
OUTREC=(01:19,5,
06:24,9,
15:3C'33D',
18:1,6,
24:42,11)
ICE146I 0 END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW
DEBUG NOABEND,ESTAE
OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL1,SORTIN=SORTI
,DYNALLOC
SORT FIELDS=COPY
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE126A 9 INCONSISTENT OUT1 IFTHEN 0 REFORMATTING FIELD FOUND
ICE052I 3 END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Mane,
Superk is right.
In both OUTFIL OUTREC operands, you have:
Code:
15:3C'33D',
18:1,6,
Since 3C'33D' gives you 9 characters, it overlaps the next column you specified (18:). C'33D' will only give you three characters, so it won't overlap the next column.
Given that all of your fields are one after the other, you might want to just drop the column numbers (c:) and let DFSORT figure them out automatically.
I have done the changes and it has worked fine.
Frank can you please ellaborate your last statement on DFSORT.
'Given that all of your fields are one after the other, you might want to just drop the column numbers (c and let DFSORT figure them out automatically'
Does it mean that, if I dnt specify the position in the output file DFSORT will calculate on its own.
Can you also give me the syntax.