Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Edited PICTURE clause "P" occupies memory???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Edited PICTURE clause "P" occupies memory???
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    Post subject:
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    Post subject: Occupies 6 bytes or 3 bytes??
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    Post subject: Re: Edited PICTURE clause "P" occupies memory???
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    Post subject:
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    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 Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us