COBOL/400 Language Help


SET Statement

Description
The SET statement establishes reference points for table handling operations by doing one of the following:
  1. Placing values associated with table elements into indexes associated with index-names
  2. Incrementing or decrementing an occurrence number
  3. Setting the status of an external switch to ON or OFF
  4. Moving data to condition names to make conditions true
  5. Setting addresses of pointer data items.

Index-names are related to a given table through the INDEXED BY phrase of the OCCURS clause; they are not further defined in the program.

When the sending and receiving fields in a SET statement share part of their storage (that is, the operands overlap), the result of the execution of such a SET statement is undefined.

The SET statement has five Formats:


[ Top of Page | Previous Page | Next Page | Table of Contents ]