IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Unpack the Packed decimal data in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Thu Jul 04, 2013 1:49 pm
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
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

Global Moderator


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

PostPosted: Thu Jul 04, 2013 2:22 pm
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: 2455
Location: Hampshire, UK

PostPosted: Thu Jul 04, 2013 5:49 pm
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

Moderator Emeritus


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

PostPosted: Fri Jul 05, 2013 9:28 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top