Can you use the IBM Enterprise COBOL for z/OS USAGE IS COMPUTATIONAL-2 hex floating point (HFP) as a binary floating point (BFP)?
The ANSI 2002 standard documents the clause ARITHMETIC IS STANDARD-BINARY.
The current ANSI 1985 versions of Enterprise COBOL for z/OS 4.2.0 and 5.1.0 do not support BFP; they only support HFP.
You will have to write an assembler program to convert.
01 BFP PICTURE X(8).
01 HFP COMP-2.
CALL "BFP2HFP" USING BFP GIVING HFP.
CALL "HFP2BFP" USING HFP GIVING BFP.
- Your assembler program BFP2HFP will use the instruction THDR.
- HFP2BFP will use TBDR as documented in chapter 9 of SA22-7832-09, the Principles of Operation.
- Be sure both HFP and BFP are double-word aligned.