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

ICETOOL to convert cobol COMP-3 to numeric


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

New User


Joined: 21 Apr 2006
Posts: 1

PostPosted: Fri Apr 21, 2006 1:18 pm
Reply with quote

Hello,
I would like to convert some fields of my file. The file was created using a cobol program. The fields are PIC 9(14)v9(4) comp-3 OR PIC 9(18) COMP-3. ...

Could you help my to unpack theses fields to a readable numeric format (zd?) using icetool.

Thank you very much
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: Fri Apr 21, 2006 9:16 pm
Reply with quote

Those would be 10-byte PD fields. You can convert them to 18-byte ZD fields using a DFSORT INREC statement. Here's a DFSORT job that shows how. I assumed the 10-byte PD field starts in position 11 and the input file has RECFM=FB and LRECL=80, but you can change the job appropriately for other positions and attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/88)
//SYSIN    DD    *
  OPTION COPY
  INREC FIELDS=(1,10,
    11,10,PD,TO=ZD,LENGTH=18,
    21,60)
/*
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top