Re: Max integer in an 8 byte COMP field?



Graham Hobbs wrote:
Always a chance I'm misunderstanding something, but this is the
VisualAge COBOL 2.2 compiler output from one of my copybooks.
I did this copybook a long time ago and it looks like it is the
product of a DCLGEN. There are several comp-5 fields.
Sorry about the format (I thought if you copied something in 'Courier
New' all would be well).

Graham,

Not in answer to your query but your comment about the source yo-yo-ing all over the place. I've had similar problems when typing e-mails. Just submitted one recently, having moved stuff around and the bloody thing is all over the place.

As regards code this is what I do - and hopefully works in small samples coming up :-)

Might be the editor one uses but I bring up a source in Net Express using fixed format, (using their default font, whatever that is).

1 - Here I have block highlighted from Column 1 to 72 :-

*>-------------------------------------------------------------
OBJECT.
*>--------------------------------------------------------------
WORKING-STORAGE SECTION.
01 charx pic x.
01 ws-choice pic x(4) comp-5.
88 ofReferences value 1.
88 ofValues value 2.
01 ws-length pic x(4) comp-5.
01 ws-size pic x(4) comp-5.
01 ws-WildCardName.
05 pic x occurs 1 to 100 depending on ws-length.

*> OBJECTS

01 os-OrderedOfReferences object reference value null.
01 os-SortedCollection object reference value null.

2 - Here I have highlighted from Column 8 to 72 :--

*>-------------------------------------------------------------
OBJECT.
*>--------------------------------------------------------------
WORKING-STORAGE SECTION.
01 charx pic x.
01 ws-choice pic x(4) comp-5.
88 ofReferences value 1.
88 ofValues value 2.
01 ws-length pic x(4) comp-5.
01 ws-size pic x(4) comp-5.
01 ws-WildCardName.
05 pic x occurs 1 to 100 depending on ws-length.

*> OBJECTS

01 os-OrderedOfReferences object reference value null.
01 os-SortedCollection object reference value null.

Might not work for you - but #1 is the one I use.

Jimmy
.