SET statement

The SET statement is used to perform an operation as described in this topic.

The operations are:

  • Placing values associated with table elements into indexes associated with index-names
  • Incrementing or decrementing an occurrence number
  • Setting the status of an external switch to ON or OFF
  • Moving data to condition names to make conditions true
  • Setting USAGE POINTER data items to a data address
  • Setting USAGE PROCEDURE-POINTER data items to an entry address
  • Setting USAGE FUNCTION-POINTER data items to an entry address
  • Setting USAGE OBJECT REFERENCE data items to refer to an object instance

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 that SET statement is undefined.