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: 1530
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: 1530
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: 1731
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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 10 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


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