Figurative Constants

The figurative constants *BLANK/*BLANKS, *ZERO/*ZEROS, *HIVAL, *LOVAL, *NULL, *ALL'x..', *ALLG'oK1K2i', *ALLU'XxxxYyyy', *ALLX'x1..', and *ON/*OFF are implied literals that can be specified without a length, because the implied length and decimal positions of a figurative constant are the same as those of the associated field. (For exceptions, see the following section, Rules for Figurative Constants.)

Figurative constants can be specified in factor 1 and factor 2 of the calculation specifications. The following shows the reserved words and implied values for figurative constants:

Reserved Words
Implied Values
*BLANK/*BLANKS
All blanks. Valid only for character, graphic, or UCS-2 fields. The value for character is ' ' (blank) or X'40', for graphic is X'4040', and for UCS-2 is X'0020'.
*ZERO/*ZEROS
Character/numeric fields: All zeros. The value is '0' or X'F0'. For numeric float fields: The value is '0 E0'.
*HIVAL
Character, graphic, or UCS-2 fields: The highest collating character for the system (hexadecimal FFs). Numeric fields: The maximum value allowed for the corresponding field (with a positive sign if applicable). For Float fields: *HIVAL for 4-byte float = 3.402 823 5E38 (/x'7F7FFFFF'/) *HIVAL for 8-byte float = 1.797 693 134 862 315 E308 (/x'7FEFFFFFFFFFFFFF'/) Date, time and timestamp fields: See Date Data Type, Time Data Type and Timestamp Data Type for *HIVAL values for date, time, and timestamp data.
*LOVAL
Character, graphic, or UCS-2 fields: The lowest collating character for the system (hexadecimal zeros). Numeric fields: The minimum value allowed (with a negative sign if applicable). For Float fields: *LOVAL for 4-byte float = -3.402 823 5E38 (/x'FF7FFFFF'/) *LOVAL for 8-byte float = -1.797 693 134 862 315 E308 (/x'FFEFFFFFFFFFFFFF'/) Date, time and timestamp fields: See Date Data Type, Time Data Type and Timestamp Data Type for *LOVAL values for date, time, and timestamp data.
*ALL'x..'
Character/numeric fields: Character string x . . is cyclically repeated to a length equal to the associated field. If the field is a numeric field, all characters within the string must be numeric (0 through 9). No sign or decimal point can be specified when *ALL'x..' is used as a numeric constant.
Note:
You cannot use *ALL'x..' with numeric fields of float format.
Note:
For numeric integer or unsigned fields, the value is never greater than the maximum value allowed for the corresponding field. For example, *ALL'95' represents the value 9595 if the corresponding field is a 5-digit integer field, since 95959 is greater than the maximum value allowed for a 5-digit signed integer.
*ALLG'oK1K2i'
Graphic fields: The graphic string K1K2 is cyclically repeated to a length equal to the associated field.
*ALLU'XxxxYyyy'
UCS-2 fields: A figurative constant of the form *ALLU'XxxxYyyy' indicates a literal of the form 'XxxxYyyyXxxxYyyy...' with a length determined by the length of the field associated with the *ALLU'XxxxYyyy' constant. Each double-byte character in the constant is represented by four hexadecimal digits. For example, *ALLU'0041' represents a string of repeated UCS-2 'A's.
*ALLX'x1..'
Character fields: The hexadecimal literal X'x1..' is cyclically repeated to a length equal to the associated field.
*NULL
A null value valid for basing pointers, procedure pointers, or objects.
*ON/*OFF
*ON is all ones ('1' or X'F1'). *OFF is all zeros ('0' or X'F0'). Both are only valid for character fields.


[ Top of Page | Previous Page | Next Page | Contents | Index ]