Use the TERMIN or TERMING statement to pass control from the CLIST
to the terminal user. You can also use TERMIN or TERMING to define
the character strings, including a null line, that a user enters to
return control to the CLIST. TERMIN is typically preceded by a WRITE
statement that requests the expected response from the terminal user.
The TERMIN or TERMING statement ends a CLIST when you issue a CLIST
in any of the following ways:
- Under ISPF
- In the background
- From a REXX exec (a nested CLIST)
Control returns to the CLIST at the statement after TERMIN or TERMING.
When control returns, &SYSDLM and &SYSDVAL have been set.
>>-+--------+--+-TERMIN--+--+-------------------------+--------->
'-label:-' '-TERMING-' +-string_1-+------------+-+
| '-user_input-' |
'-,-----------------------'
.---------------------------.
V |
>----+-----------------------+-+-------------------------------><
+-string-+------------+-+
| '-user_input-' |
'-,---------------------'
- label
- A name the CLIST can reference in a GOTO statement to branch to
this TERMIN statement. label is one-to-31
alphanumeric characters, beginning with an alphabetic character.
- TERMIN | TERMING
- transfers control to the terminal and establishes a means for
the user to return control to the CLIST.
- TERMIN
- A CLIST executed from the TERMIN is not considered nested
within the CLIST that issued the TERMIN statement, which has the following
effects:
- Sharing GLOBAL variables - GLOBAL variables cannot be shared
across the TERMIN. Global variable sharing between the CLIST executed
from the TERMIN and the CLIST that issued the TERMIN is not allowed.
- Variable access - variable access across the TERMIN cannot be
communicated through the CLIST variable access routine IKJCT441.
- Checking command output trapping (&SYSOUTTRAP) - IKJCT441
and IRXEXCOM do not recognize CLISTs or REXX execs on opposing
sides of a TERMIN element.
- CONTROL NOMSG statement - checking the NOMSG setting on opposing
sides of a TERMIN element is not allowed.
- TERMING
- A CLIST executed from the TERMING is considered nested within
the CLIST that issued the TERMING statement, which has the following
effects:
- Sharing GLOBAL variables - GLOBAL variables can be shared across
the TERMING. Global variable sharing between the CLIST executed from
the TERMING and the CLIST that issued the TERMING is allowed.
- Variable access - variable access across the TERMING can be communicated
through the CLIST variable access routine IKJCT441.
- Checking command output trapping (&SYSOUTTRAP) - IKJCT441
and IRXEXCOM recognize CLISTs or REXX execs on opposing sides of a
TERMING element.
- CONTROL NOMSG statement - checking the NOMSG setting on opposing
sides of a TERMING element is allowed.
- string_1 / string
- A character string that the terminal user enters to return control
to the CLIST. The &SYSDLM control variable contains a number
corresponding to the position of the string that the user entered
(1 for string1, 2 for string2, and so on).
- user_input
- Additional input entered by the terminal user. The input is stored
in the &SYSDVAL control variable.
- ,
- If you specify a comma in place of a string, the terminal user
can enter a null line (press the Enter key) to return control to the
CLIST.
If no operands are specified the terminal user enters a null line
to return control to the CLIST.