Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
ICETOOL to convert cobol COMP-3 to numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL to convert cobol COMP-3 to numeric
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 Moderator


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

PostPosted: Fri Apr 21, 2006 9:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us