Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Convert COMP to readable format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Tue Jan 05, 2010 3:51 pm    Post subject: Convert COMP to readable format
Reply with quote

Hi,

How to convert comp variable to readable format using SORT.

i have a o/p file first 2 fields are in comp format.

in PGM its defined as follows...
PIC S9(9) USAGE COMP.
PIC S9(4) USAGE COMP.

Output as follows...

.°.a..TISSOTXXXXX.......

output in hex as follows:-

.°.a..TISSOTXXXXX
093800DDCDC4CECD
B041017994509354

Need to check the values of comp ...plz help how to convert that.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Jan 05, 2010 4:25 pm    Post subject:
Reply with quote

Look at this link
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/C.3?DT=20080528171007
Back to top
View user's profile Send private message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Tue Jan 05, 2010 4:32 pm    Post subject:
Reply with quote

Sambhaji,

Not getting exactly...i tried this sort card but field values are comin incorrect ..plz help

//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,6,FI,TO=ZD,LENGTH=12)
Back to top
View user's profile Send private message
Lijo

New User


Joined: 24 Aug 2008
Posts: 41
Location: Cochin

PostPosted: Tue Jan 05, 2010 4:48 pm    Post subject: Reply to: Convert COMP to readable format
Reply with quote

Use something like this:

Code:
OUTREC FIELDS=(1,4,BI,TO=ZDF,5,2,BI,TO=ZDF,<copy remaining data here>)
Back to top
View user's profile Send private message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Tue Jan 05, 2010 5:12 pm    Post subject:
Reply with quote

Thanks its working
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 Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us