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

Edited PICTURE clause "P" occupies memory???


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

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Mon Apr 11, 2005 11:33 am
Reply with quote

Hi all,

I had a doubt for a long time.

When we use Edited PICTURE clause "P" does it occupy memory.

Eg. A PIC 999PPP. ==> Occupies 6 bytes or 3 bytes??

Thanx in advance.
Back to top
View user's profile Send private message
Niteshs

New User


Joined: 24 Mar 2005
Posts: 6

PostPosted: Mon Apr 11, 2005 12:21 pm
Reply with quote

The size will be counted as three bytes.
The character P represents a scaling factor for this data item and does not count in the size of the data item.

03 MICROS PIC PPP999.

the data item MICROS can contain values between 0.000001 and 0.000999. The size of the data item is three, and the three zeros between the decimal point and number are not explicitly represented in the number.
Back to top
View user's profile Send private message
ch_ramesh896

New User


Joined: 17 Jun 2006
Posts: 1

PostPosted: Sun Jul 02, 2006 2:26 pm
Reply with quote

it occupies 6 bytes. except sign(s) , v and some symbols memory is required man.
Back to top
View user's profile Send private message
manisha-s
Warnings : 1

New User


Joined: 22 May 2006
Posts: 13

PostPosted: Mon Jul 03, 2006 1:14 pm
Reply with quote

P
represents a virtual digit in a number that has no storage allocated to it. For example PIC '99ppp' can contain the value 15000 as x'f1f5' with the number being assumed to represent thousands.


This shows that 99ppp has storage for 99 only and not for ppp.

Thanks and Regards
Manisha
Back to top
View user's profile Send private message
manikant pathak

New User


Joined: 09 May 2005
Posts: 37
Location: bangalore

PostPosted: Mon Jul 03, 2006 7:39 pm
Reply with quote

hi all,

Answer for this is a simple NO.

FYI..

Meaning of P: An assumed decimal scaling position. Used to specify the location of an assumed decimal point when the point is not within the number that appears in the data item.

Size Of P: Not counted in the size of the data item. Scaling position characters are counted in determining the maximum number of digit positions in numeric-edited items or in items that are used as arithmetic operands.
The size of the value is the number of digit positions represented by the PICTURE character-string.

thanks and regards,

MKP
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 PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts To search DB2 table based on Conditio... DB2 1
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Using PARM=('JPn"&SYMBOL&quo... DFSORT/ICETOOL 2
Search our Forums:

Back to Top