View previous topic :: View next topic
|
Author |
Message |
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
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 |
|
|
Niteshs
New User
Joined: 24 Mar 2005 Posts: 6
|
|
|
|
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 |
|
|
ch_ramesh896
New User
Joined: 17 Jun 2006 Posts: 1
|
|
|
|
it occupies 6 bytes. except sign(s) , v and some symbols memory is required man. |
|
Back to top |
|
|
manisha-s Warnings : 1 New User
Joined: 22 May 2006 Posts: 13
|
|
|
|
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 |
|
|
manikant pathak
New User
Joined: 09 May 2005 Posts: 37 Location: bangalore
|
|
|
|
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 |
|
|
|