Free-Form Named Constant Definition
A free-form named constant definition begins with DCL-C; followed by the name of the constant; followed by the value either specified directly, or using the CONST keyword; and finally a semicolon.
Examples of free-form named constant definitions
- The following example shows two constants named
CON_1 and
CON_2.
One uses the CONST keyword, and the other defines
the value of the constant directly.
There is no difference in meaning between specifying
the CONST keyword and not specifying it.
DCL-C CON_1 CONST(1); DCL-C CON_2 2;
- The following example shows a named
constant array_total_size that is defined
with the value of a built-in function.
DCL-S array CHAR(25) DIM(100); DCL-C array_total_size %SIZE(array:*ALL);