Use the ATTN statement to define a routine that TSO/E executes
when the user causes an attention interrupt. The attention interrupt
halts execution of a CLIST so that the user can terminate or alter
its processing.
.-OFF----.
>>-+--------+--ATTN--+-action-+--------------------------------><
'-label:-'
- label
- A name the CLIST can reference in a GOTO statement to branch to
this ATTN statement. label is one-to-31
alphanumeric characters, beginning with an alphabetic character.
- OFF
- Any previous attention action is nullified. Do not use ATTN OFF
within an attention routine.
- action
- specifies either:
- One TSO/E command, commonly an EXEC command that invokes an attention
processing CLIST, or a null (blank) line. An attention processing
CLIST can execute multiple TSO/E commands, while the action can execute
only one.
- A DO-END sequence constituting an attention exit routine. This
routine can contain CLIST statements, including the RETURN statement
or EXIT statement, and one TSO/E command, or a null line.
If a null line is executed, TSO/E ignores the attention and
execution continues at the point where the interruption occurred.
If
an EXIT statement is executed, the attention is ignored and the CLIST
is terminated.
If a TSO/E command is executed, control is given
to the command.
When a TSO/E command, an EXIT statement, or
a null line is executed, TSO/E ignores all other.
If the attention
routine does anything other than terminate the CLIST, use the MAIN
operand of the CONTROL statement to protect the CLIST from being flushed
from the input stack when an attention interrupt occurs. For more
information, see CONTROL statement.