COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-224
SET TO
•
Index Values Before and After Execution
If the sending item is an index-name, then before the execution of the SET TO
statement, the value of the index must correspond to an occurrence number of an
element in the associated table.
If the receiving item is an index-name, then after the execution of the SET TO
statement, the value of the index must correspond to an occurrence number of an
element in the associated table.
•
External Switches
The SET statement modifies the status of the external switch associated with each
specified mnemonic-name. When the SET statement changes the status of a
switch to ON, any condition-name associated (in the SPECIAL-NAMES paragraph)
with the ON setting of that switch evaluates to TRUE. When the SET statement
changes the status of a switch to OFF, any condition-name associated (in the
SPECIAL-NAMES paragraph) with the ON setting of that switch evaluates to
FALSE.
•
Condition Names
The SET statement assigns to the conditional variable associated with the
condition-name the value of the first literal in the VALUE clause of the
definition of the condition-name.
When more than one condition-name appears in the SET statement, the
results are the same as if a separate SET statement had been written for each
condition-name in the same order as specified in the SET statement.
•
integer Out of Range
In the statement
SET index-name-n TO integer
the value of integer must be at least zero and not greater than the maximum
number of occurrences plus one. If the value of integer is outside this range, a
warning message is produced. If the warning message is produced and subscript
checking is active, the run unit terminates abnormally.
If the value of integer is greater than 2,147,483,647 or less than -
2,147,483,648, or if the product of integer and the occurrence length of the
associated table (the length of one occurrence of the table) is not within that range,
a run-time error occurs.
•
Any Sending Item Out of Range
If the value of any sending item (identifier-1, index-name-1, or integer )
is greater than 2,147,483,647 or less than -2,147,483,648 and subscript checking
is active, an error message is produced and the run unit terminates abnormally.