Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1544
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: 1544
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: 1932
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
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us