MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ICETOOL to convert cobol COMP-3 to numeric

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
polo021
Beginner


Joined: 21 Apr 2006
Posts: 1
Topics: 1

PostPosted: Fri Apr 21, 2006 2:46 am    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
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Apr 21, 2006 4:30 am    Post subject: Reply with quote

polo021,

Assuming that your Input PD field starts from pos 1 for a length of 9 bytes then try this

Code:

//SYSIN    DD *           
 SORT FIELDS=COPY         
 OUTREC FIELDS=(1,9,PD,M26)
/*   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 21, 2006 11:07 am    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)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group