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

Maximum Value in 9(04) COMP


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

Moderator Emeritus


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

PostPosted: Tue May 12, 2009 12:43 pm
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: 50
Location: Bangalore

PostPosted: Tue May 12, 2009 12:56 pm
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

Moderator Emeritus


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

PostPosted: Tue May 12, 2009 1:13 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue May 12, 2009 4:41 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts SORT ERROR PARAMETER VALUE EXCEEDS M... DFSORT/ICETOOL 12
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
Search our Forums:

Back to Top