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

Zoned Decimal identification


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

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Tue Feb 02, 2010 2:49 am
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
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 02, 2010 3:09 am
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

Moderator Emeritus


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

PostPosted: Tue Feb 02, 2010 3:45 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Feb 02, 2010 11:00 am
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
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 Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
No new posts String has hex character need to conv... COBOL Programming 3
No new posts How to display the leading zeros of a... DB2 7
Search our Forums:

Back to Top