Data Definition Language (DDL) Reference Manual

Named Constants
Data Definition Language (DDL) Reference Manual529431-004
4-6
COBOL
COBOL
When generating COBOL source code from CONSTANT statements:
If you request COBOL source-code output, by giving the COBOL command, the
DDL compiler generates a level-01 data description entry for each named
constant.
For a string constant, the DDL compiler generates a string value identical to the
specified constant value.
For a numeric constant, the DDL compiler generates a COBOL data type based on
the type of the numeric constant:
Unsigned binary constants are translated to COBOL signed data types.
For a product version constant, the DDL compiler generates a COBOL NATIVE-2
elementary item that contains the product version number.
Pascal (D-series Systems Only)
When generating Pascal source code from CONSTANT statements:
If you request Pascal source-code output, by giving the PASCAL command, the
DDL compiler generates Pascal constants.
The DDL compiler converts any hyphen in the constant name to an underscore (_)
in the Pascal constant name.
Pascal does not support the TYPE clause in the CONSTANT statement.
For a string constant, the DDL compiler generates a Pascal FSTRING constant.
For a numeric constant, the DDL compiler generates a Pascal numeric constant.
For a product version constant, the DDL compiler generates the product version
number.
Constant Type COBOL Data Type
BINARY 16 NATIVE-2
BINARY 32 NATIVE-4
BINARY 64 NATIVE-8
BINARY 16 UNSIGNED NATIVE-2
BINARY 32 UNSIGNED NATIVE-4