Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Zoned Decimal identification

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 107
Location: India

PostPosted: Tue Feb 02, 2010 2:49 am    Post subject: Zoned Decimal identification
Reply with quote

I need to know how to identify zoned decimal?

Would appreciate if i can get a piece of code.

Thanks.
Back to top
View user's profile Send private message
References
Bill O'Boyle

Active Member


Joined: 14 Jan 2008
Posts: 985
Location: South Carolina, USA

PostPosted: Tue Feb 02, 2010 3:09 am    Post subject: Reply to: Zoned Decimal identification
Reply with quote

Zoned Decimal (a/k/a Display Numeric) can be either signed or unsigned. Example -

Code:

03  WS-ZONED-SIGNED PIC S9(10) VALUE +0123456789.
03  WS-ZONED-UNSIGNED PIC 9(10) VALUE 0123456789.

When signed, the last byte (in this example, a 9) is a value of X'C9' (the 'C' zone nibble is the overpunch character). If it were a negative value, then it would equal X'D9'.

When unsigned (again, a 9) the value is X'F9' (no overpunch).

In both value clauses above, 012345678 are the same, with each byte having an 'F' zone nibble.

Bill
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 13553
Location: 221 B Baker St

PostPosted: Tue Feb 02, 2010 3:45 am    Post subject:
Reply with quote

Hello,

Quote:
I need to know how to identify zoned decimal?
Where? In code or in some data?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 5386
Location: italy

PostPosted: Tue Feb 02, 2010 11:00 am    Post subject: Reply to: Zoned Decimal identification
Reply with quote

the principle of operations manual will tell the all You need to know about the numeric data representations.
searching for it by Yourself will deepen Your knowledge on the ways of finding faster the info You need icon_biggrin.gif
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1