Re: reading COBOL Sequential output file (Easy Question)---Help
From: Judson McClendon (judmc_at_sunvaley0.com)
Date: 11/28/03
- Next message: SkippyPB: "Re: OT: Hemlines"
- Previous message: Judson McClendon: "Re: OT 50 States was: OT: Hemlines"
- In reply to: Michael Mattias: "Re: reading COBOL Sequential output file (Easy Question)---Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 10:48:21 -0600
"Michael Mattias" <michael.mattias@gte.net> wrote:
> "Judson McClendon" <judmc@sunvaley0.com> wrote:
> > "Thane Hubbell" <thaneh@softwaresimple.com> wrote:
> > > One caution below...
> > >
> > > "Judson McClendon" <judmc@sunvaley0.com> wrote:
> > >
> > > > > but what do I do with a
> > > > > FLOORPLAN pic s99v99
> > > >
> > > > The field is exactly 4 characters. The rightmost character is both
> > > > the low-order digit and the sign. Here are the possible values for
> > > > the rightmost character:
> > > >
> > > > Digit value: 0 1 2 3 4 5 6 7 8 9
> > > > - - - - - - - - - -
> > > > Field Negative: p q r s t u v w x y
> > > > Field Positive: 0 1 2 3 4 5 6 7 8 9
> > > >
> > >
> > > The sign representation is implimentor defined - and differs between
> > > COBOL compilers.
> >
> > Oops! You're right, Thane. :-)
>
> My MF manual contains this:
> "The USAGE IS DISPLAY clause (whether specified explicitly or implicitly)
> specifies that a standard data format is used to represent a data item in
> the storage of the computer, and that the data item is aligned on a
> character boundary".
>
> This does NOT contain one of the "MF" or "VSC2" 'circles' indicating a
> implementor extension; nor does the description of the sign encoding for
> USAGE IS DISPLAY for not-separately signed numeric data. In this latter
> section the manual indicates negative signing is accomplished by setting bit
> 6 of the character on (i.e., add x'40') ; this will, of course, result in a
> different display character depending on the character-set in use.
>
> So, are you guys really sure that the sign encoding is implementor-defined?
> Above seems to indicate it's standard.
In COBOL 85, yep. Paragraph 3.17.4(1) says the 'S' character specifies
that the field is signed, but neither the position or the representation of the
sign. Paragraph 3.17.4(3)c declares that if you specify the 'SIGN is
SEPARATE' clause, the representation must be "the standard data format
characters '+' and '-'." I knew this, but much of my experience is on EBCDIC
mainframes, where there is considerable consistency in display sign
representation (upper 4 bits almost always hex C for pos, D for neg), and it
just slipped my mind when I made my post.
-- Judson McClendon judmc@sunvaley0.com (remove zero) Sun Valley Systems http://sunvaley.com "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
- Next message: SkippyPB: "Re: OT: Hemlines"
- Previous message: Judson McClendon: "Re: OT 50 States was: OT: Hemlines"
- In reply to: Michael Mattias: "Re: reading COBOL Sequential output file (Easy Question)---Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]