Hexadecimal (hex) is a storage format. Comp-2 is the COBOL definition of a long precision (double word; 8 bytes) floating point field. They are completely different. You shouldn't have to concern yourself with the hex representation of the data.
If you are working on an IBM M/F system modify and re-compile your pgm by including a non-zero VALUE for the COMP-2 field and making the first 2 PD stmts:
Code:
DISPLY '>' yr-comp2-var-name '<'
STOP RUN
Use SDSF to look at your execution SYSOUT; turn HEX ON; and it will give you an idea of how the data is stored in the field. Although, as tcsbiz sez, you don't have to be concerned w/the data representation.
Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.