COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-210
SET TO
identifier-1
is the name of an integer elementary item or an index data item to be set.
identifier-2
is the name of an integer data item or an index data item.
index-name-1
is the name of an index to be set.
index-name-2
is the name of an index.
integer
is a numeric literal having no fractional part. If signed, it must have a positive value.
mnemonic-name
is the mnemonic name associated with an external switch in the SPECIAL-NAMES
paragraph of the Environment Division. A SET statement can refer to any of the 15
external switches.
condition-name
is the condition-name (level-88 item) associated with a conditional variable.
Usage Considerations:
Index-Names and Index Data Items
An index-name is directly associated with a table and is declared in the INDEXED
phrase of the table’s data description entry. The value associated with an index-
name is related only to the table with which it is defined.
An index data item is a separate data item, not associated with any table, that is
declared with the USAGE INDEX clause.
Copying and Converting Values
The SET statement performs copying between indexes and index data items. It
also performs conversions from indexes to integer data items (occurrence
numbers) or from integer data items (occurrence numbers) to indexes. This
conversion is necessary because the values associated with indexes and index
data items are machine-architecture related, whereas the occurrence numbers are
not.