View previous topic :: View next topic
|
Author |
Message |
blpraveen123 Currently Banned New User
Joined: 26 Apr 2007 Posts: 12 Location: Mysore
|
|
|
|
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 |
|
|
Raphael Bacay
New User
Joined: 04 May 2007 Posts: 58 Location: Manila, Philippines
|
|
|
|
I was able to see this from
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 |
|
|
blpraveen123 Currently Banned New User
Joined: 26 Apr 2007 Posts: 12 Location: Mysore
|
|
|
|
Thanks for reply |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
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 |
|
|
|