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
 

 

Maximum Value in 9(04) COMP

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

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Tue May 12, 2009 11:46 am    Post subject: Maximum Value in 9(04) COMP
Reply with quote

Hi,
What is the maximum value that can be moved to a variable of data type 9(04) COMP SYNC.

Regards,
Saagu
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 12:43 pm    Post subject:
Reply with quote

Hello,

Suggest you follow the advice you received in your quite similar topic of 2 days ago.

If you find something in the manual that is not clear, post what your found and someone will be able to clarify.
Back to top
View user's profile Send private message
sakthikumarT

New User


Joined: 09 Apr 2009
Posts: 42
Location: Bangalore

PostPosted: Tue May 12, 2009 12:56 pm    Post subject: Reply to: Maximum Value in 9(04) COMP
Reply with quote

Hello,
We can store maximum values between these ranges
-32768 to 32767
you have declared the usage clause sync,so it might occupy some extra byte but those extra bytes are always unused.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 12, 2009 1:13 pm    Post subject:
Reply with quote

Hello,

Suggest you do some testing and re-post your findings. You will find that a 9(4) comp field will have 9999 as the max (unless provision is made for more).

What you have posted may be more mis-leading than helpful. . .

As Saagu was suggested in this and the other similar topic, some lookup in the manual is in order.
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: Tue May 12, 2009 4:41 pm    Post subject:
Reply with quote

The allowed range depends upon the compiler options. Change the options, change the range. The manuals link at the top of the page allows use of the COBOL Language Reference and COBOL Programming Guide, which talks extensively of the compiler options and their impact.
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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm
No new posts What is the maximum number of sort wo... Pravina M SYNCSORT 2 Mon Mar 14, 2016 4:51 pm


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