Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
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    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

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, 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

Site Director


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

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: 10210
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Identification Division anandgbe COBOL Programming 2 Sat May 28, 2016 11:51 am
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. JCL to convert float decimal into rea... polymathtarun JCL & VSAM 3 Sun May 15, 2016 9:57 pm
No new posts conversion from char to packed decimal Musab Ahmed DFSORT/ICETOOL 7 Fri Apr 08, 2016 1:12 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us