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 

Convert packed decimal(comp-3) to readable format

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


Joined: 29 Jan 2004
Posts: 62
Topics: 19

PostPosted: Tue Nov 01, 2005 11:13 am    Post subject: Convert packed decimal(comp-3) to readable format Reply with quote

Hi,

I have an input file with Comp-3 data from column 113-117 with picture clause S9(10)V99. Total lenght of input file is 292 bytes.

My requirement is to convert comp-3 data to numeric with sign (MASK) and with rest of the data of the input file as it is. The output file will have increased LRECL.

Sample data in hex format from col 113- 117

--+----2-
`
0000173
000099D
------------
= -197.93 (This is what I want in my output file).

Please provide me some sample JCL to do the above.

Thanks
Rahul
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Nov 01, 2005 11:29 am    Post subject: Reply with quote

Rahull,

try these control cards

Code:

//SYSIN    DD *                                                 
 SORT FIELDS=COPY                                               
 OUTREC FIELDS=(001,112,
                113,7,PD,EDIT=(STTTTTTTTTT.TT),SIGNS=('+','-',,),
                120,173)
/*   


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
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