The format of the constant_name statement is illustrated below.
The value of a constant may be a character string, a decimal number, a hexadecimal string, a bit string, a two-digit year date string, or a system symbol string.
A constant_name representing a specific value can be used whenever it is valid on an MFX control statement. Note that the length and format must be compatible with the usage on the control statement.
The table starting on the next page describes the types of constant values.
Value Type |
Description |
Valid Examples |
Invalid Examples |
---|---|---|---|
Character string |
Valid formats: 'xx...x' C'xx...x' nC'xx...x' c'xx...x' nc'xx...x' where x is an EBCDIC character and n is a repetition factor for the string. The maximum length for n is 4095. The maximum length of the string is 64 characters. To include a single apostrophe (') in a character string, use two single apostrophes (''), which count as 2 characters. |
|
(unnecessary extra apostrophe after Y)
(missing ending apostrophe) |
Decimal number |
Valid formats: n +n -n Maximum length is 31 significant digits. Decimal points are invalid. |
|
(too many plus signs)
(minus sign in wrong place)
(decimal point not allowed) |
Hexadecimal string |
Valid formats: X'yy...yy' nX’yy...yy’ x'yy...yy' nx’yy...yy’ where yy represents any pair of hexadecimal digits and n is a repetition factor. The maximum value for n is 4095. The maximum length of the string is 32 pairs of hexadecimal digits. Hexadecimal digit are 0-9, A-F, or a-f. |
|
(H is not a valid hexadecimal digit)
(unpaired hexadecimal digit 2) |
Bit string |
Valid formats: B'bbbbbbbb...bbbbbbbb' b'bbbbbbbb...bbbbbbbb'. Each group of 8 bs represents the 8 bits that compose one byte. Maximum length is 8 groups of 8 bits each. A bit is a 1, 0 or . (period). Must be a multiple of 8 bits. |
|
(only 4 bits, 8 needed)
(no bits specified)
(invalid bit value 2) |
Two-digit year date string |
Valid formats: Y'LOW' Y'HIGH' Y'BLANKS' Y'x...x' Y'DATE1' Y'DATE2' Y'DATE3' y'LOW' y'HIGH' y'BLANKS' y'x...x' y'DATE1' y'DATE2' y'DATE3' where x...x represents 2 to 6 decimal digits. |
|
(fewer than 2 digits)
(blank is not a valid digit)
(more than 6 digits)
(should be 'BLANKS') |
System Symbol |
Valid formats: S'&xx...xx' s'&xx...xx' where x...x represents the system symbol all in uppercase. |
|
(not in uppercase) |