Page 1 of 1

Comp internal representation

PostPosted: Sat Jun 05, 2010 6:00 pm
by coollearner
Hi,
Can I know how the following data item is stored:

01 PIC s9(4) COMP

I have supplied the value as -1234

I want to know the internal representation of the data

Re: Comp internal representation

PostPosted: Sat Jun 05, 2010 6:15 pm
by enrico-sorichetti
the cobol manuals and the IBM principle of operations will tell everything You might want to know

http://www-03.ibm.com/systems/z/os/zos/ ... ppls2.html
for the COBOL stuff
any version/release will do, data representation description does not change )

http://www-03.ibm.com/systems/z/os/zos/bkserv/r10pdf/
for the POP ( Principles of Operations) SA22-7832-07

Re: Comp internal representation

PostPosted: Sat Jun 05, 2010 8:13 pm
by dick scherrer
Hello,

One way to check any value is to force a dump and look at the value in the dump. To make it easy to find your value of interest in the dump, put an "eye-catcher" before and afterthe field.

Something like:
01  my-stuff.
    05 eyecatch1    pic x(16) 'before the value'.
    05 the-value    pic s9(4) comp value -1234.
    05 eyecatch2    pic x(15) 'after the value'.