Examples of COBOL set, COBOL index and subscript syntax and command.

>COBOL Index
In contrast to the subscript, the SEARCH verb uses a COBOL INDEX which is defined by name with the table. The actual setup of the index is done through COBOL. The COBOL INDEX is limited in use. It must be used with the table that defined it and it must be controlled using either the PERFORM statement with the varying clause or the COBOL SET verb.

>COBOL SET Statement
The COBOL SET statement is described in the Micro Focus Server Express Manual. The COBOL SET statement is used to alter the status of external switches. The COBOL SET statement establishes reference points for table handling operations by setting indices associated with table elements.

A COBOL INDEX cannot be manipulated by the standard arithmetic verbs (ADD, SUBTRACT,...) or the MOVE verb. Instead, the COBOL SET verb is used.

A tutorial that demonstrates how the COBOL SET verb may be used to set a condition name to true.

>SET Command (COBOL)
The COBOL SET command is described in the IBM Debug Tool for z/OS Reference and Messages. The COBOL SET command assigns a value to a COBOL reference. The COBOL SET keyword cannot be abbreviated.

>COBOL Subscript
A COBOL subscript can be an integer literal, an arithmetic expression, a data name, or a subscripted data name that has an integer value.

>COBOL Subscript
This example shows the use of tables with COBOL subscripts.


Joomla SEF URLs by Artio