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
 

 

Max Limit for PIC S9(9) USAGE COMP ??

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

New User


Joined: 17 Nov 2008
Posts: 4
Location: United states

PostPosted: Wed Oct 14, 2009 5:38 pm    Post subject: Max Limit for PIC S9(9) USAGE COMP ??
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Wed Oct 14, 2009 5:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Oct 14, 2009 6:05 pm    Post subject:
Reply with quote

Regardless of the setting of the TRUNC compiler option, COMP-5 data items behave like binary data does in programs compiled with TRUNC(BIN).
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: Wed Oct 14, 2009 7:01 pm    Post subject: Reply to: Max Limit for PIC S9(9) USAGE COMP ??
Reply with quote

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
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 )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Limit CICS CPU resource vasanthz CICS 0 Tue Jan 31, 2017 7:09 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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