When Format 2 of the SET statement is executed, the value of the receiving field is increased (UP BY) or decreased (DOWN BY) by a value that corresponds to the value in the sending field.
SET Statement - Format 2
.--------------.
V |
>>-SET----index-name-3-+--+-UP BY---+--+-identifier-3-+--------><
'-DOWN BY-' '-integer-2----'
+-------------------------------IBM Extension--------------------------------+
Identifier-3 cannot be a floating-point data item.
+----------------------------End of IBM Extension----------------------------+
When Format 2 of the SET statement is executed, the contents of the receiving field are increased (UP BY) or decreased (DOWN BY) by a value that corresponds to the number of occurrences represented by the value of identifier-3 or integer-2.
+-------------------------------IBM Extension--------------------------------+
If index-name-3 refers to a table that has a subordinate item that contains an OCCURS DEPENDING ON clause, and if the ODO object is changed before executing a Format 2 SET Statement, index-name-3 cannot contain a value that corresponds to an occurrence number of its associated table. For more information, see Appendix H, Complex OCCURS DEPENDING ON.
+----------------------------End of IBM Extension----------------------------+
Receiving fields are acted upon in the left-to-right order in which they are specified. The value of the incrementing or decrementing field at the beginning of SET statement execution is used for all receiving fields.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.