View previous topic :: View next topic
|
Author |
Message |
mavesum
New User
Joined: 17 Nov 2008 Posts: 4 Location: United states
|
|
|
|
could some one pls tell me what would be the max limit that can be stored in a variable defined as PIC S9(9) USAGE COMP
please explain also how you calculated .
TIA
Mave |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Either 999,999,999 or 2,147,483,647 -- the actual maximum depends on a compiler option. TRUNC(BIN) allows the binary value maximum of 2 to the 31st power minus 1 while TRUNC(STD) allows the picture size to determine the maximum. TRUNC(OPT) is the other option and in that case, the actual value may not be determined in advance. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Adding to Dick's response, unless you absolutely need a sign, unsigned COMP-5 (Native Binary) 9(09) has a maximum value of 4,294,967,295.
COMP-5 was introduced with OS390/COBOL version 2.2 about 10 years ago.
Bill |
|
Back to top |
|
|
|