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

Regarding the Value of Pic clause


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Mon Feb 04, 2008 12:38 pm
Reply with quote

Hi All,
Could anyone let me know what values this element would take:-
A pic 999v9(10) value 000000000000500000.

when refer modification as (10:9), and when (11:8).
Thanks...
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Feb 04, 2008 12:58 pm
Reply with quote

Please explain your question bit more.. It is really confusing us..
Code:
A pic 999v9(10) value 000000000000500000.

For above declaration compiler will give error as the value specified in value clause exceeds the limit.
Suggestion is, you should experiment such things instead of asking on forum, it will save your time and learning will be more.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Feb 04, 2008 6:27 pm
Reply with quote

You can't refer to a PIC 9 anything so well with reference mod. The value does not exceed the declaration. Since it is a number going into a numeric it will right align and chop the high order bits.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Feb 04, 2008 6:39 pm
Reply with quote

stodolas wrote:
You can't refer to a PIC 9 anything so well with reference mod. The value does not exceed the declaration. Since it is a number going into a numeric it will right align and chop the high order bits.


You can use reference mod with pic 9 fields as long as they are display. But both (10:9) and (11:8) would cause a compile error since they exceed the length of the field.
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 To search DB2 table based on Conditio... DB2 1
No new posts NOT IN clause in COBOL pgm COBOL Programming 8
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts usage of CASE in WHERE clause DB2 10
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
Search our Forums:

Back to Top