bhaskar_kanteti
Active User
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
|
|
|
|
Hi,
I had a query converting NUMERIC to COMP-3.
I am copying all the data from input file to output file using icetool.
The important thing is one of the field in my input is 9(10) and the same field in my output is s9(10) comp-3. How can i convert this filed from numeric to comp-3.
This is my job:
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//*INPUT FILE
//INPUT DD DSN=INPUT.FILE,DISP=SHR
//*OUTPUT FILE
//OUTPUT DD DSN=OUTPUT.FILE,
// DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
// RECFM=FB,LRECL=563,
//TOOLIN DD *
COPY FROM(INPUT) TO(OUTPUT) USING(CTL1)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=OUTPUT,REMOVECC,
OUTREC=(1:1,7,8:40,3,11:14,26,37:43,486,523:539,13, -
536:552,10,FI,TO=PD,LENGTH=6, -
542:562,6,548:568,10,FI,TO=PD,LENGTH=6, -
554:538,1,555:529,9)
/*
The bolded part is the way i tried to convert from numeric to somp-3.
But it is giving error as follows:
Code: |
OUTFIL FNAMES=OUTPUT,REMOVECC,
OUTREC=(1:1,7,8:40,3,11:14,26,37:43,486,523:539,13, -
536:552,10,FI,TO=PD,LENGTH=6, -
?
REFORMATTING FIELD ERROR
542:562,6,548:568,10,FI,TO=PD,LENGTH=6, -
?
SYNTAX ERROR
554:538,1,555:529,9)
?
SYNTAX ERROR
END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You have 552,10,FI and 568,10,ZD - the 10 is flagged because the maximum length for an FI field is 8.
But you say your input field is 9(10). That's a ZD field, not an FI field. So you should use 552,10,ZD instead of 552,10,FI and 568,10,ZD instead of 568,10,FI. The maximum length for a ZD field is 31. |
|