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

Difference b/w zone decimal & pack decimal


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
priyanga

New User


Joined: 26 Aug 2004
Posts: 5

PostPosted: Sat Oct 02, 2004 12:59 pm
Reply with quote

hi,


what is difference b/w zone decimal & pack decimal



thank u
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Tue Oct 05, 2004 9:57 pm
Reply with quote

PACKED DECIMAL reserves half byte per character. To store in packed decimal use COMP-3.

The internal format of storage is 8421.

Zoned decimal reserves one 2B/ 4B / 8B depending on the no of inputs.

Use COMP / BINARY to store in Zoned Decimal.

The internal format is Binary.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Oct 06, 2004 8:03 am
Reply with quote

Hi Pryia,

What you describe as Zoned Decimal is really Binary. Zoned Decimal is External Decimal (usage DISPLAY).

A Zoned Decimal number is represented in storage as e.g. F1F2F3C4 for a positive 1234. The Fs and the C are the zones.
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 Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts Difference between joblib and steplib JCL & VSAM 2
No new posts Pull data using date difference betwe... DB2 6
No new posts small int to zoned decimal conversion DFSORT/ICETOOL 3
Search our Forums:

Back to Top