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
 

 

How to Unpack the Packed decimal data in COBOL

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

New User


Joined: 25 Sep 2009
Posts: 13
Location: chennai

PostPosted: Thu Jul 04, 2013 1:39 pm    Post subject: How to Unpack the Packed decimal data in COBOL
Reply with quote

Hi,

Please suggest how to handle below scenario in COBOL.

I have 2 variables (as given below) in my input file.

05 TDs-A PIC S9(05) COMP-3.
05 TDs-B PIC 9(04) COMP-3.

I want to unpack above Packed decimal data before writing in to my output file.

Please help me to resolve this issue. Thanks.!
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Jul 04, 2013 1:49 pm    Post subject:
Reply with quote

Here , Does unpack mean to display the data in readable format (without Hex on) ??
Back to top
View user's profile Send private message
latheef

New User


Joined: 25 Sep 2009
Posts: 13
Location: chennai

PostPosted: Thu Jul 04, 2013 2:05 pm    Post subject: Reply to: How to Unpack the Packed decimal data in COBOL
Reply with quote

My intention is I want to convert this packed decimal data in to zoned decimal format. please help me the zoned decimal variables declaration for above variables.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu Jul 04, 2013 2:22 pm    Post subject:
Reply with quote

Lots of examples in forum please search and what have you tried so far?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1722
Location: UK

PostPosted: Thu Jul 04, 2013 5:49 pm    Post subject:
Reply with quote

This is a basic beginners question. You should not be on this forum but on the sister forum http://ibmmainframeforum.com/index.php
and there is nothing that cannot be found in the COBOL language reference manual and COBOL user guide.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 05, 2013 9:28 pm    Post subject:
Reply with quote

Hello,

If you do not have this working yet, suggest you define 2 new fields with the PICtures you want for the output.

Try a few things and if there is still doubt, post what you tried, what happened, and your doubt.

Some will be able to clarify.
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


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