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

Do we have any Computation USAGE CLAUSE for ZONED DECIMAL?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
Reply with quote

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
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
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
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
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 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 To search DB2 table based on Conditio... DB2 1
No new posts STEM usage in REXX CLIST & REXX 14
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top