MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Max Value which PIC S9(5)V9(4) can hold

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
pkrish_18
Beginner


Joined: 08 Apr 2005
Posts: 12
Topics: 7

PostPosted: Tue May 24, 2005 6:27 am    Post subject: Max Value which PIC S9(5)V9(4) can hold Reply with quote

Hi,

Can you pls let me know the max value which the following variable can hold?

TGT-ITEM-TRANSFER-PRICE PIC S9(5)V9(4) COMP.

It will be preferable if you can tell me how much the real part can hold and how much the precision or decimal part can hold

Regards,

Krish
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue May 24, 2005 8:04 am    Post subject: Reply with quote

pkrish18,

The above definition occupies 4 bytes (full-word) and it can store -2,147,483,648 through +2,147,483,647.

Cobol does not store the decimal point explicitly

Check this link for a detailed explanation of COMP items

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/5.3.16.1?SHELF=&DT=20020920180651&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Crox
Beginner


Joined: 29 May 2004
Posts: 52
Topics: 9

PostPosted: Sat Jun 18, 2005 2:06 pm    Post subject: Reply with quote

It also depends on the specification of the TRUNC parm of the compiler. If it is TRUNC(STD), it will make the field behave like the STandDard COBOL definition!

If you want no trouble with the TRUNC, define not COMP but COMP-5.

Regards,

Crox
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group