The Enterprise COBOL for z/OS has USAGE IS COMPUTATIONAL-2 for hex floating point. How do I get it to use binary floating point?
The ANSI 2002 standard documents the clause
ARITHMETIC IS STANDARD-BINARY.
which is what I want.
Diagnosing the problem
The current ANSI 1985 version of Enterprise COBOL for z/OS 4.2.0 does not support BFP. It only supports HFP. You will have to write an assembler program to convert.
Resolving the problem
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 BFP is double-word aligned.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.