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: 1713
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 How to move a long alphanumeric data ... lind sh COBOL Programming 2 Mon Dec 05, 2016 7:51 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


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