1. INITIALIZE
The INITIALIZE statement sets certain values in identifier-1 based on the data categories described in identifier-1. If the REPLACING phrase is specified, it sets identifier-1 with values in identifier-2 or literal-1. It is functionally identical to one or more MOVE statements.
The following items are specified in the statement.
-
identifier-1
-
Must not contain the RENAMES clause.
-
The receiving area where values are set. The following items can be specified.
Item Description Group item
Alphanumeric data. If the REPLACING phrase is specified and identifier-1 is an alphanumeric group item, subordinate items of identifier-1 are initialized according to the rule for the REPLACING clause.
Elementary data item
A data item from the alphabetic, alphanumeric, alphanumeric-edited, DBCS, numeric, numeric-edited, and internal/external floating-point categories.
-
-
identifier-2, literal-1
-
Specifies an elementary data item or a literal that can be specified as a sending area in a MOVE or SET statement.
To specify special registers in identifier-1 and identifier-2, they must be able to be specified as a receiving area or a sending area in each MOVE statement.
-
-
REPLACING phrase
-
If the data category specified in the REPLACING phrase is identical to the category of identifier-1, the value of identifier-2 or literal-1 is set in identifier-1.
-
A floating-point item is treated as it is in the NUMERIC category.
-
The same categories must not be duplicated in a REPLACING phrase.
-
|
The category validity for identifier-1, identifier-2, and the REPLACING phrase is not internally checked, so the user must specify a data item or category that is appropriate for the MOVE or SET rules. |
If the REPLACING phrase is not specified, the following values can be set in identifier-1.
-
If the category of identifier-1 is alphabetic, alphanumeric, alphanumeric-edited, or DBCS, figurative constant space is set.
-
If the category of identifier-1 is numeric, numeric-edited, or external floating-point, figurative constant zero is set.
-
If the category of identifier-1 is a pointer, figurative constant null is set.