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
 

 

Need help on picture clause P

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

New User


Joined: 02 Jun 2011
Posts: 4
Location: hyderabad

PostPosted: Thu Jun 02, 2011 4:45 pm    Post subject: Need help on picture clause P
Reply with quote

hi, can any one give me a demonstration code on usage of picture clause P
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jun 02, 2011 4:49 pm    Post subject:
Reply with quote

Code:
77  WS-VAR PIC X.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Jun 02, 2011 4:52 pm    Post subject: Reply to: need help pn picture clause
Reply with quote

What does the manual say? What happened when you try to demonstrate it? Can't say as I've ever used it, just seen it in error messaged "...discarded unless picture clase is Pand-then-lots-of-stuff-for-old-UK-pounds-shillings-and-pence-currency."

A voyage of discovery.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Jun 02, 2011 6:47 pm    Post subject:
Reply with quote

A piece from the Language Reference:

Quote:

With some exceptions, numeric literals in a VALUE clause must have a value
within the range of values indicated by the PICTURE clause for the item. For
example, for PICTURE 99PPP, the literal must be zero or within the range 1000
through 99000. For PICTURE PPP99, the literal must be within the range 0.00000
through 0.00099.


So in the first example, the value you have (0-99) represents the number of Thousands. Fifty thousand would be 50 and then the three P's represent the number of zeros inserted before the decimal place arrives.
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: Thu Jun 02, 2011 8:37 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

What do you want to accomplish and where are you stuck?

If you have nothing specific you are looking for, suggest you read the information in the COBOL manual (there is a link to IBM Manuals at the top of the page) and then do a bit of experimenting on your system.

If there are any questions / problems, post back here and someone should be able to clarify.
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 Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts [SQL0029] INTO clause missing from em... HABBIE DB2 2 Fri Sep 04, 2015 3:54 pm
No new posts 3-D Table with nested DEPENDING ON Cl... VivekKhanna COBOL Programming 5 Sat Aug 08, 2015 11:18 pm
No new posts when=group clause: question about the... tuxama DFSORT/ICETOOL 2 Thu Mar 26, 2015 12:51 pm
No new posts pic clause on group variable error CuriousMainframer COBOL Programming 6 Mon Jul 14, 2014 6:33 pm


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