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.1 Format 1: SET for Basic Table Handling



When this form of the SET statement is executed, the current value of the receiving field is replaced by the value of the sending field (with conversion).


    ___ Format 1--SET (Basic Table Handling) _______________________________ 
   |                                                                        |
   |          <__________________                                           |
   | >>__SET____ _index-name-1_ _|__TO__ _index-name-2_ _________________>< |
   |            |_identifier-1_|        |_identifier-2_|                    |
   |                                    |_integer-1____|                    |
   |                                                                        |
   |________________________________________________________________________|
index-name-1, identifier-1
Receiving fields.

Must name either index data items or elementary numeric integer items.
X The receiving fields cannot be windowed date fields.

index-name-2
Sending field.

The value before the SET statement is executed must correspond to the occurrence number of its associated table.

identifier-2
Sending field.

Must name either an index data item or an elementary numeric integer
X item. The sending field cannot be a windowed date field.

integer-1
Sending field.

Must be a positive integer.

Table 48shows valid combinations of sending and receiving fields in a Format 1 SET statement.


 Table 48. Sending and Receiving Fields for Format 1 SET Statement         
                             
                             
                             
 Sending Field               
               Receiving Field               
               
   Index-name  
  Index Data  
     Item     
 Integer Data 
     Item     
 Index-name                        Valid         Valid(*)         Valid    
 Index Data Item                  Valid(*)       Valid(*)          --      
 Integer Data Item                 Valid            --             --      
 Integer Literal                   Valid            --             --      
 (*)No conversion takes place                                              


Receiving fields are acted upon in the left-to-right order in which they are specified. Any subscripting or indexing associated with an identifier's receiving field is evaluated immediately before the field is acted upon.

The value used for the sending field is the value at the beginning of SET statement execution.

The value for an index-name after execution of a SEARCH or PERFORM statement can be undefined; therefore, a Format 1 SET statement should reinitialize such index-names before other table-handling operations are attempted.


X If index-name-2 is for a table that has a subordinate item that contains
X an OCCURS DEPENDING ON clause, then undefined values can be received into
X identifier-1.


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.