Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

6.2.33.2 Format 2: SET for Adjusting Indexes



When this form 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.


    ___ Format 2--SET (Adjusting Indexes) __________________________________ 
   |                                                                        |
   |          <______________                                               |
   | >>__SET____index-name-3_|__ _UP BY___ __ _identifier-3_ ____________>< |
   |                            |_DOWN BY_|  |_integer-2____|               |
   |                                                                        |
   |________________________________________________________________________|
The receiving field can be specified by index-name-3. This index-name value both before and after the SET statement execution must correspond to the occurrence numbers in an associated table.

The sending field can be specified as identifier-3, which must be an elementary integer data item, or as integer-2, which must be a nonzero
X integer. Identifier-3 cannot be a windowed date field.

When the Format 2 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. 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.


X If index-name-3 is for a table that has a subordinate item that contains
X an OCCURS DEPENDING ON clause, and if the ODO object is changed before
X executing a Format 2 SET Statement, then index-name-3 cannot contain a
X value that corresponds to an occurrence number of its associated table.


X For more information on complex OCCURS DEPENDING ON, see the IBM COBOL
X Programming Guide for your platform.

Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.