Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
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: 2504
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
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us