Named Constants
Data Definition Language (DDL) Reference Manual — 426798-002
4 -7
CONSTANT Statement
•
For a version constant, DDL generates a TACL TEXT variable that contains the
version number.
•
The internal representation of a DDL constant in TACL differs from the following
representations:
°
The internal representation of DDL constants in pTAL, TAL, and COBOL.
°
The internal representation of all other DDL objects in TACL. For a definition,
record, token code, token map, or token type, DDL generates a TACL
STRUCT with the same internal representation as pTAL or TAL source code.
This difference should cause no problems in messages because messages contain
data structures, not constants. If, however, you use #APPENDV to move a TACL
representation of a DDL constant to a message for a program coded in another
language, the value in the message will not match the same DDL constant in the
other language.
TAL Guidelines
The following points are guidelines for generating pTAL or TAL source code from
CONSTANT statements:
•
If you request pTAL or TAL source-code output by giving the TAL command, DDL
generates pTAL or TAL source code for named constants.
•
DDL converts any hyphen in the constant name to a circumflex (^) in the TAL
DEFINE name.
•
For a string constant, DDL generates a TAL DEFINE. Each DEFINE specifies a
value that exactly matches the constant value. Note that TAL limits the length of a
string constant to 128 bytes, although DDL accepts string constants up to 130
ASCII characters long.
•
For a numeric constant, DDL generates a pTAL or TAL literal based on the type of
the numeric constant. A numeric constant with a value n results in a different pTAL
or TAL literal for each DDL constant type:
If the type is specified as unsigned, DDL generates the pTAL or TAL literal in octal
representation.
•
For a version constant, DDL generates a pTAL or TAL literal that has a type
equivalent to BINARY 16 UNSIGNED and that contains the version number.
Constant Type
pTAL or TAL Data Type
BINARY 16
n
BINARY 32
n
D
BINARY 64
n
F
Содержание 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 ...