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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Timestamp difference and its average ... DB2 11
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top