Troubleshooting
Problem
zSeries hardware has hex floating point, binary floating point, and decimal floating point. COBOL supports HFP but what about BFP or DFP?
Diagnosing The Problem
Chapter 3 of the Programming guide SC23-8529-01 page 52 says COMP-1 and COMP-2 data items are stored in zSeries hexadecimal format. The ISO/IEC 1989:2002 COBOL standard of July 1, 2010 has defined reserved words STANDARD-BINARY and STANDARD-DECIMAL but these are unsupported.
Resolving The Problem
The answer to the question is: BFP and DFP are unsupported in this version. Only HFP is supported.
You will have to write an Assembler program to convert. You will use the hardware instructions THDR and TBDR or perhaps PFPO. The PFPO can convert between any two of these format BFP, DFP, and HFP.
Was this topic helpful?
Document Information
Modified date:
08 August 2018
UID
swg21620626