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

What does PP stands in S9(5)PP ?


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

New User


Joined: 27 May 2008
Posts: 19
Location: India

PostPosted: Sun Jul 20, 2008 7:46 pm
Reply with quote

What does PP stand for in the above declaration?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Jul 20, 2008 8:18 pm
Reply with quote

See topic 5, table 10 in the Enterprise Language Reference Manual.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 21, 2008 12:43 am
Reply with quote

Hello,

FYI - "the Enterprise Language Reference Manual" is available via the "IBM Manuals" link at the top of the page.
Back to top
View user's profile Send private message
vcjadhav
Warnings : 1

New User


Joined: 27 May 2008
Posts: 19
Location: India

PostPosted: Fri Nov 28, 2008 11:50 am
Reply with quote

I have checked the above link but the material was not much clear to explain my doubt. I think giving an example would help.
For eg. If I define a variable PIC 9(04)PP and move the value 1234 in it and try displaying the same value the value then the data that gets displayed is 0012.

However if I have 2 fields one var-1 PIC 9(04) and var-2 PIC 9(04)PP then if I move 1234 in var-1 and 1234 in var-2 and then do the following things:
display var-1 (it displays 1234)
display var-2 (it displays 0012)
add both variables i.ae., var-1 + var-2 (it displays 2434)

I would like to know whats the significance of using PP ? and why does it behave differently while displaying the data and while using it for calculations.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 28, 2008 5:54 pm
Reply with quote

P in a PICTURE is a scaling factor -- having two of them means the value of the variable is expressed in hundreds. When you move 1234 to the field, the 34 is discarded since only the hundreds and more significant digits will be kept. So when you display the value, you see 12 (i.e., 12 hundred). Adding the two variables together, 1234 + 1200 = 2434, so the system is showing the expected behavior. There is no difference in behavior; there's a problem in how you see the behavior but COBOL is consistent and follows the manual in this case.
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 What Does M10 Stands For ? DFSORT/ICETOOL 4
No new posts SORT FIELDS=(44,15,AQ,A) What AQ stan... DFSORT/ICETOOL 2
No new posts What this statement "//HD06 DD D... JCL & VSAM 1
No new posts What These keywords stands for: NOMVS CA Products 4
No new posts What DEMAND parameter stands for........ CA Products 1
Search our Forums:

Back to Top