IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting from Numeric to COMP-3 in job


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Thu Jul 12, 2007 8:45 pm
Reply with quote

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
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jul 12, 2007 8:55 pm
Reply with quote

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.
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Fri Jul 13, 2007 4:22 pm
Reply with quote

Hi Frank Yaeger,

Its working.
Thank you very much.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Convert HEX to Numeric DB2 3
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top