"P" picture character 
Author Message
 "P" picture character

Hello,

I have been working with COBOL for 15+ years and in all that time  I
have never used the 'P' picture character nor have I ever seen it used
in any program I have supported. And during those years I have seen and
supported many programs.

I was just wondering if anyone of you have ever used or seen it used.

Thanks!

(I guess I have too much time on my hands this weekend to be thinking of
this)



Fri, 17 Oct 2003 05:31:42 GMT  
 "P" picture character
15 years here as well and never seen a 'P' in the pic clause. What
does it do ?


Quote:
> Hello,

> I have been working with COBOL for 15+ years and in all that time  I
> have never used the 'P' picture character nor have I ever seen it used
> in any program I have supported. And during those years I have seen and
> supported many programs.

> I was just wondering if anyone of you have ever used or seen it used.

> Thanks!

> (I guess I have too much time on my hands this weekend to be thinking of
> this)



Fri, 17 Oct 2003 07:07:00 GMT  
 "P" picture character
As per my VSII manual -

P - an assumed decimal scaling position. It is used to specify the
location of an assumed decimal point, when the point is not within
the number that appears in the data item.

e.g. PIC PPP999 would have a range of valid values from 0 to .000999.

In my 14 years - I've never used it either - normally use a separate scaling
factor.

Wonder how well it relates to other numeric & edited fields e.g. ZZZ999.

P.S. is PIC VZZZ999 a valid pic ?


Quote:
> 15 years here as well and never seen a 'P' in the pic clause. What
> does it do ?



> > Hello,

> > I have been working with COBOL for 15+ years and in all that time  I
> > have never used the 'P' picture character nor have I ever seen it used
> > in any program I have supported. And during those years I have seen and
> > supported many programs.

> > I was just wondering if anyone of you have ever used or seen it used.

> > Thanks!

> > (I guess I have too much time on my hands this weekend to be thinking of
> > this)



Fri, 17 Oct 2003 07:20:42 GMT  
 "P" picture character

Quote:
> Hello,

> I have been working with COBOL for 15+ years and in all that time  I
> have never used the 'P' picture character nor have I ever seen it used
> in any program I have supported. And during those years I have seen and
> supported many programs.

> I was just wondering if anyone of you have ever used or seen it used.

> Thanks!

I wrote a record layout sizing utility. Never having used or seen scaled
decimals myself, I decided not to support scaled decimals. I knew it
existed, so I put right in the documentation that I did not support 'P' in
the PICTURE IS clause. (Although I actually did support it for dataname size
purposes, because I ignored it when parsing the PICTURE clause).

First week it was available (at www.flexus.com/softwaredownload.html, get
file COBFD.ZIP) someone dropped me a note saying they had to have it. I said
no.

I have a list of what I am going to support in the next version. Scaled
Decimals has still not made that list.

MCM



Fri, 17 Oct 2003 08:00:29 GMT  
 "P" picture character


Quote:
> As per my VSII manual -

> P - an assumed decimal scaling position. It is used to specify the
> location of an assumed decimal point, when the point is not within
> the number that appears in the data item.

> e.g. PIC PPP999 would have a range of valid values from 0 to .000999.

> In my 14 years - I've never used it either - normally use a separate
scaling
> factor.

> Wonder how well it relates to other numeric & edited fields e.g. ZZZ999.

> P.S. is PIC VZZZ999 a valid pic ?

No. Only one type of picture character can define digits to the right of the
decimal point.

    .ZZZZZ is valid
    VZZZZ is valid.



Fri, 17 Oct 2003 08:31:08 GMT  
 "P" picture character

Quote:

>Hello,

>I have been working with COBOL for 15+ years and in all that time  I
>have never used the 'P' picture character nor have I ever seen it used
>in any program I have supported. And during those years I have seen and
>supported many programs.

>I was just wondering if anyone of you have ever used or seen it used.

>Thanks!

>(I guess I have too much time on my hands this weekend to be thinking of
>this)

I've never seen it used, but I know of a good case when we *could* use it.  I
work for a bank.  We assign cash reserve limits in hundred dollar increments.
We actually have the D-RSRV-LIMIT field set as S9(7) COMP-3, taking up 4 bytes.
If we intead had it as S9(5)P(2) we could save a byte.

Wow, huh?

Frank Swarbrick

"I'm very seldom {*filter*}." --Willow Rosenberg "Buffy the Vampire Slayer"



Fri, 17 Oct 2003 10:21:51 GMT  
 "P" picture character

Quote:

> Hello,

> I have been working with COBOL for 15+ years and in all that time  I
> have never used the 'P' picture character nor have I ever seen it used
> in any program I have supported. And during those years I have seen and
> supported many programs.

> I was just wondering if anyone of you have ever used or seen it used.

I've been coding COBOL for most of my nearly 22 years programming and
never seen it used either.

I've also never seen exponentiation used, or IBM COMP-1 and COMP-2
floating point.  I've hardly ever seen BLANK WHEN ZERO or JUSTIFY.

I did run into a problem converting OS/VS COBOL to COBOL II in the
early 1990's with the IBM NOTE verb.  I was trying to write a program
to convert them automagically, and NOTE was a problem.

--
http://arnold.trembley.home.att.net/



Fri, 17 Oct 2003 11:09:57 GMT  
 "P" picture character
15 years and im still learning.... :) ... Just a kid at heart.

Thanks guys


Quote:



> > As per my VSII manual -

> > P - an assumed decimal scaling position. It is used to specify the
> > location of an assumed decimal point, when the point is not within
> > the number that appears in the data item.

> > e.g. PIC PPP999 would have a range of valid values from 0 to .000999.

> > In my 14 years - I've never used it either - normally use a separate
> scaling
> > factor.

> > Wonder how well it relates to other numeric & edited fields e.g. ZZZ999.

> > P.S. is PIC VZZZ999 a valid pic ?

> No. Only one type of picture character can define digits to the right of
the
> decimal point.

>     .ZZZZZ is valid
>     VZZZZ is valid.



Fri, 17 Oct 2003 13:29:08 GMT  
 "P" picture character



Quote:
> As per my VSII manual -

> P - an assumed decimal scaling position. It is used to specify the
> location of an assumed decimal point, when the point is not within
> the number that appears in the data item.

> e.g. PIC PPP999 would have a range of valid values from 0 to .000999.

pic ppp999 is invalid
pic 999ppp would have a range of valid values from 0 to 999000 in steps of
1000.

Quote:
> In my 14 years - I've never used it either - normally use a separate
scaling
> factor.

> Wonder how well it relates to other numeric & edited fields e.g. ZZZ999.

This is just an editing picture

Quote:
> P.S. is PIC VZZZ999 a valid pic ?

No

Quote:


> > 15 years here as well and never seen a 'P' in the pic clause. What
> > does it do ?



> > > Hello,

> > > I have been working with COBOL for 15+ years and in all that time  I
> > > have never used the 'P' picture character nor have I ever seen it used
> > > in any program I have supported. And during those years I have seen
and
> > > supported many programs.

> > > I was just wondering if anyone of you have ever used or seen it used.

> > > Thanks!

> > > (I guess I have too much time on my hands this weekend to be thinking
of
> > > this)

PPP999 is invalid
999PPP gives you a number like 679000. if you gives this a value you have to
give this value 679000 not 679. those P is handy when you use rounded

01    a        pic 999ppp.
01    b        pic 9999    value 4687.
01    c        pic 99999    value 21137.

compute a rounded = b + c.

the sum is 25824 but now a has the value 26000, without the rounded a would
have the value 25000.

You also can use P behind a comma: VPPP99,
V999PP is invalid

I'm studying cobol for the second year at school, never seen it at school,
but I bought a book of cobol, and there I saw it explained.



Fri, 17 Oct 2003 16:14:40 GMT  
 "P" picture character



Quote:
> 15 years and im still learning.... :) ... Just a kid at heart.

> Thanks guys





> > > As per my VSII manual -

> > > P - an assumed decimal scaling position. It is used to specify the
> > > location of an assumed decimal point, when the point is not within
> > > the number that appears in the data item.

> > > e.g. PIC PPP999 would have a range of valid values from 0 to .000999.

> > > In my 14 years - I've never used it either - normally use a separate
> > scaling
> > > factor.

> > > Wonder how well it relates to other numeric & edited fields e.g.
ZZZ999.

> > > P.S. is PIC VZZZ999 a valid pic ?

> > No. Only one type of picture character can define digits to the right of
> the
> > decimal point.

> >     .ZZZZZ is valid

this is valid indeed, but also .ZZZZ9 is valid (in my compiler)

Quote:
> >     VZZZZ is valid.

This is invalid

The Z says it is an editing picture, and the V says it isn't an editing
picture, use the previous one instead



Fri, 17 Oct 2003 16:17:01 GMT  
 "P" picture character



Quote:

> > Hello,

> > I have been working with COBOL for 15+ years and in all that time  I
> > have never used the 'P' picture character nor have I ever seen it used
> > in any program I have supported. And during those years I have seen and
> > supported many programs.

> > I was just wondering if anyone of you have ever used or seen it used.

> I've been coding COBOL for most of my nearly 22 years programming and
> never seen it used either.

> I've also never seen exponentiation used, or IBM COMP-1 and COMP-2
> floating point.  I've hardly ever seen BLANK WHEN ZERO or JUSTIFY.

If used blank when zero before, in report writer. (used to created a
printable document)

- Show quoted text -

Quote:
> I did run into a problem converting OS/VS COBOL to COBOL II in the
> early 1990's with the IBM NOTE verb.  I was trying to write a program
> to convert them automagically, and NOTE was a problem.

> --
> http://arnold.trembley.home.att.net/



Fri, 17 Oct 2003 16:19:32 GMT  
 "P" picture character
The only place I ever used the "P" was to express population stats as people
per 100,000.  Strangely enough, I had forgotten all about it, and coded the
routine within a day of a similar question on this NG about four years back.

Donald


Quote:
> Hello,

> I have been working with COBOL for 15+ years and in all that time  I
> have never used the 'P' picture character nor have I ever seen it used
> in any program I have supported. And during those years I have seen and
> supported many programs.

> I was just wondering if anyone of you have ever used or seen it used.

> Thanks!

> (I guess I have too much time on my hands this weekend to be thinking of
> this)



Fri, 17 Oct 2003 20:40:20 GMT  
 "P" picture character

Quote:

> I've also never seen exponentiation used, or IBM COMP-1 and COMP-2
> floating point.  I've hardly ever seen BLANK WHEN ZERO or JUSTIFY.

> I did run into a problem converting OS/VS COBOL to COBOL II in the
> early 1990's with the IBM NOTE verb.  I was trying to write a program
> to convert them automagically, and NOTE was a problem.

> --
> http://arnold.trembley.home.att.net/

I have not used comp-1 or comp-2, and rarely exponentation (usually it's only
squaring a field and for that A * A is just as good and saves tons of object
code); but both BLANK WHEN ZERO and JUSTIFY save lots of programming on
reports: I have had many cases where our users wanted blanks on a report
instead of zeros.


Fri, 17 Oct 2003 22:03:11 GMT  
 
 [ 37 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. '"""' and linefeed characters

2. F83 for "PS/2" systems

3. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

4. Characters "?", "?", "ΓΌ" shown in wrong font

5. French- "Y" picture template

6. "picture" type

7. PICTURE VALUE "P"

8. looking for "-picture" extension

9. The "LAMP" character

10. VW and "foreign" characters

11. "hexadecimal characters" in ST.

12. files of 8 character "AABKIJLE"

 

 
Powered by phpBB® Forum Software