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
 

 

Do we have any Computation USAGE CLAUSE for ZONED DECIMAL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
blpraveen123
Currently Banned

New User


Joined: 26 Apr 2007
Posts: 12
Location: Mysore

PostPosted: Wed Jun 20, 2007 10:17 am    Post subject: Do we have any Computation USAGE CLAUSE for ZONED DECIMAL?
Reply with quote

Hi,

Do we have any Computational CLAUSE for the Zoned Decimal like we use COMP-3 for Packed Decimal?
Do zoned decimal used in any program?
Back to top
View user's profile Send private message

Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed Jun 20, 2007 12:13 pm    Post subject:
Reply with quote

I was able to see this from
http://www.simotime.com/spsnum01.htm

It might be useful for your question.

1. BINARY, On an IBM Mainframe a binary field is 2, 4 or 8 bytes in length. A binary field is defined in COBOL with the USAGE IS COMPUTATIONAL clause. This is usually abbreviated as COMP.

2. PACKED-DECIMAL, On an IBM Mainframe a a packed-decimal field uses one byte to store two digits except for the sign position that contains a single digit in the high-order nibble and the sign value in the low order nibble. A packed-decimal field is defined in COBOL with the USAGE IS COMPUTATIONAL-3 clause. This is usually abbreviated as COMP-3.

3. ZONED-DECIMAL, On an IBM Mainframe a zoned-decimal field contains the text value of a digit in each byte except in the sign position (this is usually the units position) which uses the high-order nibble to store the sign value.A zoned-decimal field is defined in COBOL with the USAGE IS DISPLAY clause. This USAGE clause is usually omitted since zoned-decimal is the default format for COBOL.

4. EDITED, typically used to prepare or convert numeric data that is stored in a variety of formats (i.e. the preceding three formats) into a format that is easily read by human beings or easily exported to a non-Mainframe or non-COBOL environment such as an excel spreadsheet running on a Windows platform.
Back to top
View user's profile Send private message
blpraveen123
Currently Banned

New User


Joined: 26 Apr 2007
Posts: 12
Location: Mysore

PostPosted: Thu Jun 21, 2007 12:08 pm    Post subject: Re: Do we have any Computation USAGE CLAUSE for ZONED DECIM
Reply with quote

Thanks for reply
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jun 21, 2007 1:49 pm    Post subject: Re: Do we have any Computation USAGE CLAUSE for ZONED DECIM
Reply with quote

blpraveen123 wrote:
Hi,

Do we have any Computational CLAUSE for the Zoned Decimal like we use COMP-3 for Packed Decimal?
Do zoned decimal used in any program?


USAGE IS DISPLAY
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 21, 2007 2:00 pm    Post subject:
Reply with quote

Quote:
3. ZONED-DECIMAL, On an IBM Mainframe a zoned-decimal field contains the text value of a digit in each byte except in the sign position (this is usually the units position) which uses the high-order nibble to store the sign value.A zoned-decimal field is defined in COBOL with the USAGE IS DISPLAY clause. This USAGE clause is usually omitted since zoned-decimal is the default format for COBOL


which means it is the default and you do not need code the USAGE. Zoned decimal concept is used in SORT eg.SORT FIELDS=(1,10,ZD,A)
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 Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm


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