Comp internal representation



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Comp internal representation

Postby coollearner » Sat Jun 05, 2010 6:00 pm

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
Knowledge is wealth
coollearner
 
Posts: 33
Joined: Thu Jun 03, 2010 3:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comp internal representation

Postby enrico-sorichetti » Sat Jun 05, 2010 6:15 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Comp internal representation

Postby dick scherrer » Sat Jun 05, 2010 8:13 pm

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'. 
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post