Named Constants
Data Definition Language (DDL) Reference Manual — 426798-002
4 -5
CONSTANT Statement
C Guidelines
The following points are guidelines for generating C source code from CONSTANT
statements:
•
If you request C source-code output, by giving the C command, DDL generates
#define
s for named constants.
•
DDL converts any hyphen in the constant name to an underscore (_) in the
#define
name.
•
DDL generates uppercase letters for names that follow #define.
•
For a string constant, DDL generates a
#define
of this form:
#define CONSTANT-NAME string-literal
•
For a numeric constant, DDL generates a
#define
of this form:
#define CONSTANT-NAME numeric-constant
•
For a version constant, DDL generates a
#define
that contains the version
number.
COBOL85 Guidelines
The following points are guidelines for generating COBOL85 source code from
CONSTANT statements:
•
If you request COBOL85 source-code output, by giving the COBOL command,
DDL generates a level 01 data description entry for each named constant.
•
For a string constant, DDL generates a string value identical to the specified
constant value.
•
For a numeric constant, DDL generates a COBOL85 data type based on the type
of the numeric constant:
Unsigned binary constants are translated to COBOL85 signed data types.
•
For a version constant, DDL generates a COBOL85 NATIVE-2 elementary item
that contains the version number.
Constant Type
COBOL85 Data Type
BINARY 16
NATIVE-2
BINARY 32
NATIVE-4
BINARY 64
NATIVE-8
BINARY 16 UNSIGNED
NATIVE-2
BINARY 32 UNSIGNED
NATIVE-4
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...