Page 1 of 1

hex value display

Posted: Fri Dec 27, 2013 6:28 pm
by Deepakkumar
Dear experts:
how can i see hex value of a variable.
like
01 A pic 9(4) value 1234.
01 B pic s9(4) comp-3.
but when we move A to B. then when we display comp-3. it shows 1234.i know because display convert it from packed to zoned for display..

can it is possible that we can show this hex value....... :)

Re: hex value display

Posted: Fri Dec 27, 2013 7:20 pm
by Robert Sample
Google is your friend. When I Googled cobol show hex data the first link returned is http://www-01.ibm.com/support/docview.w ... wg21177358 which contains a COBOL program to display hexadecimal data.

Re: hex value display

Posted: Fri Dec 27, 2013 7:24 pm
by William Collins
REDEDFINES B as PIC X(3). DISPLAY that field. Use SET HEX ON (or similar for what you use for looking at the spool) to see the hex value.

Or find a program that can display your storage in hex (I'd pass up on the horrible one Robert found, but it is from IBM...)