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
 

 

Data type conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vero123

New User


Joined: 10 Sep 2005
Posts: 4

PostPosted: Sat Sep 10, 2005 9:51 pm    Post subject: Data type conversion
Reply with quote

Hi,

I'd like to know how to convert 9-digit packed decimal data into 16-digit
character data in E-COBOL.

I'd appreciate your reply in this regard.

Thanks
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Sep 10, 2005 10:16 pm    Post subject:
Reply with quote

I guess you know that a 9 DIGIT comp-3 (packed) variable is 5 BYTES long and a 16 DIGIT char variable is 16 BYTES long.

Given that:
Code:

pd-9-digit        pic S9(009) comp-3.
ch-16-digit       pic S9(016).


move pd-9-digit to ch-16-digit


There may be variations on this depending on what you're trying to accomplish.
Back to top
View user's profile Send private message
vero123

New User


Joined: 10 Sep 2005
Posts: 4

PostPosted: Sun Sep 11, 2005 1:23 am    Post subject:
Reply with quote

Thanks for your response
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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