Named Constants
Data Definition Language (DDL) Reference Manual — 426798-002
4 -4
CONSTANT Statement
If you use the version number for a comparison check with other version numbers, you
can use the number as is. If you need to decode the number to determine the specified
release, do this:
•
Obtain the letter of the release by dividing the number by 256. The quotient is the
ASCII decimal representation of the uppercase letter; any remainder is ignored.
•
Obtain the number of the release by multiplying this ASCII decimal representation
of the uppercase letter by 256 and subtracting the answer from the version
number.
For example, given the version number 17162, you can determine the release number
as follows:
17162 divided by 256 = 67.04
67 is the ASCII decimal representation for the letter C
67 multiplied by 256 = 17152, and 17162 - 17152 = 10
C10 is the release
Existing Constant Guidelines
The following points are guidelines for using the name of an existing constant as the
value in a CONSTANT statement:
•
You can specify a DDL constant name instead of a literal value in the VALUE
clause of a CONSTANT statement whether the constant name identifies a string
constant, a numeric constant, or a version constant.
•
When the name identifies a previously defined string constant, the new value is
identical to the value of the string constant.
•
When the name identifies a previously defined version constant, the new value is
identical to the value of the version constant.
•
When an existing numeric constant is named in the definition of another DDL
numeric constant, certain rules apply:
°
If the CONSTANT statement does not include a TYPE clause, the constant
being defined inherits the type of
existing-constant
.
°
If the CONSTANT statement has a TYPE clause, its specified type overrides
the type of
existing-constant
.
°
If a TYPE clause in the CONSTANT statement overrides the type of
existing-constant
, the value of
existing-constant
must be consistent
with the specified type.
Содержание 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 ...