INITIALIZE Statement Rules
- Whether identifier-1 references an elementary or group item, all operations
are performed as if a series of MOVE statements had been written, each of
which had an elementary item as a receiving field.
If the REPLACING phrase is specified:
- If identifier-1 references a group item, any elementary item within the data item referenced by identifier-1 is initialized only if it belongs to the category specified in the REPLACING phrase.
- If identifier-1 references an elementary item, that item is initialized only if it belongs to the category specified in the REPLACING phrase.
This initialization takes place as if the data item referenced by identifier-2 or literal-1 acts as the sending operand in an implicit MOVE statement to the identified item.
All such elementary receiving fields, including all occurrences of table items within the group, are affected, with the following exceptions:- Index, pointer, and procedure-pointer data items
- Elementary FILLER data items
- Items that are subordinate to identifier-1 and contain a REDEFINES clause, or any items subordinate to such an item. (However, identifier-1 may contain a REDEFINES clause or be subordinate to a redefining item.)
- BOOLEAN data items
- Data items described with the FORMAT clause as DATE, TIME, or TIMESTAMP .
- The areas referenced by identifier-1 are initialized in the order (left to right) of the appearance of identifier-1 in the statement. Within a group receiving field, affected elementary items are initialized in the order of their definition within the group.
- If identifier-1 occupies the same storage area as identifier-2, the result of the execution of this statement is undefined, even if these operands are defined by the same data description entry.
- If identifier-1 is a group item, then all of the items within that group item are considered as being referenced in the program.