[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] displaying max values in comp-5 field
From: |
Bill Klein |
Subject: |
Re: [open-cobol-list] displaying max values in comp-5 field |
Date: |
Mon, 27 Jul 2009 00:47:22 -0500 |
Although you are correct about the Standard, I think you will find that
almost all existing implementations allow for the DISPLAY of COMP-? items.
See, for example,
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IGY3LR40/6.2.10
When allowed this, they SHOULD display the "full value" - although different
compilers handle the sign in different ways.
> -----Original Message-----
> From: Sergey Kashyrin [mailto:address@hidden
> Sent: Sunday, July 26, 2009 11:23 PM
> To: address@hidden
> Subject: Re: [open-cobol-list] displaying max values in comp-5 field
>
> Hi,
>
> I think it's not about that
> It's about DISPLAY which actually not suppose to display ANY
> binary or comp-3/4/5 fields.
> I don't see any contradictions with formal Cobol.
>
> Not going to do any fixes on that, correct me if I wrong
>
> Regards
> SKA
>
> ----- Original Message -----
> From: "vince coen" <address@hidden>
> To: <address@hidden>
> Sent: Sunday, July 26, 2009 7:05 AM
> Subject: [open-cobol-list] displaying max values in comp-5 field
>
>
> > Hi;
> >
> > On Saturday 25 July 2009, Robert Keane wrote:
> >> Hello All,
> >>
> >>
> >> I've found a problem when displaying the maximum value in
> a comp-5 field.
> >> If an s9(4) comp-5 can hold +32767 or -32768. After
> initializing or moving
> >> +32767 or -32768 to the s9(4) comp-5 field the display
> gives +2767 or
> >> -2768, the high order digit is dropped. However if the
> comp-5 field is
> >> moved to a field defined with enough z's the display is ok.
> >
> > A dropped leading digit does not supprise me. Moving above
> 9,999 to a pic s9
> > (4) will result in truncation. Solution is to increase
> picture size to
> > reflect the maximum value your field will get to in this
> case pic s9(5)
> > comp-5.
> >
> > Or better still use binary-short, its more effective for
> arithmetic etc in OC.
> >
> > Vince
> >
> >>
> >>
> >> Bob Keane
> >
> >
> >
> --------------------------------------------------------------
> ----------------
> > _______________________________________________
> > open-cobol-list mailing list
> > address@hidden
> > https://lists.sourceforge.net/lists/listinfo/open-cobol-list
> >
>
> --------------------------------------------------------------
> ----------------
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>
- [open-cobol-list] displaying max values in comp-5 field, vince coen, 2009/07/26
- Re: [open-cobol-list] displaying max values in comp-5 field, Sergey Kashyrin, 2009/07/27
- Re: [open-cobol-list] displaying max values in comp-5 field,
Bill Klein <=
- Re: [open-cobol-list] displaying max values in comp-5 field, vince coen, 2009/07/27
- Re: [open-cobol-list] displaying max values in comp-5 field, Michael, 2009/07/27
- Re: [open-cobol-list] displaying max values in comp-5 field, Bill Klein, 2009/07/27
- Re: [open-cobol-list] displaying max values in comp-5 field, Gary Cutler, 2009/07/28
- Re: [open-cobol-list] displaying max values in comp-5 field, michael, 2009/07/28
- Re: [open-cobol-list] displaying max values in comp-5 field, vince coen, 2009/07/28
- Re: [open-cobol-list] displaying max values in comp-5 field, Bill Klein, 2009/07/28