z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Passing control to the terminal

z/OS TSO/E CLISTs
SA32-0978-00

Two CLIST statements are available for transferring control to the terminal and establishing a means for the user to return control to the CLIST:

  1. TERMIN transfers control to the terminal and establishes a means for the user to return control to the CLIST. A CLIST executed from the TERMIN is considered to be not nested within the CLIST that issued the TERMIN statement, and global variables sharing between the two CLISTs is not allowed.
  2. TERMING transfers control to the terminal and establishes a means for the user to return control to the CLIST. A CLIST executed from the TERMING is considered to be nested within the CLIST that issued the TERMING statement, and global variables sharing between the two CLISTs is allowed.

Other differences in how TERMIN and TERMING transfer control are listed in Table 1.

Table 1. TERMIN and TERMING statement comparison
Characteristic TERMIN TERMING
Share GLOBAL variables across the TERMIN(G) element No Yes
Variable access across the TERMIN(G) element through CLIST access routine IKJCT441 No Yes
Checking Command Output Trapping - IKJCT441 and IRXEXCOM recognize CLIST and REXX execs on opposing sides of a TERMIN(G) element No Yes
CONTROL NOMSG statement - allow checking the NOMSG setting on opposing sides of a TERMIN(G) element No Yes

Because the TERMIN and TERMING elements are CLIST-generated type elements which cannot be added to the input stack through the external STACK service routine, they are considered to be of the same type. If the topmost stack element is a TERMIN or TERMING element, return code 60 (X'3C') is returned. For more information see TERMIN and TERMING statement.

Note: If you issue a CLIST containing a TERMIN or TERMING statement, under either ISPF or a REXX exec, or in the TSO/E background, the TERMIN or TERMING statement ends the CLIST. For CLISTs issued in the TSO/E background, TSO/E also issues message IKJ56550I to indicate that the TERMIN or TERMING statement is not supported for background processing.

The TERMIN or TERMING statement either defines character strings, one of which the user must enter to return control to the CLIST; or null lines, where the user must press the Enter key to return control to the CLIST.

The TERMIN or TERMING statement normally does not function alone. WRITE statements preceding the TERMIN or TERMING statement inform the user why control is being transferred to the terminal and how to return control to the CLIST.

Unlike the READ statement, TERMIN or TERMING enables the user to enter commands or subcommands, and invoke programs before responding to the WRITE statement prompts.

As soon as the CLIST issues the TERMIN or TERMING statement, the user receives control at the terminal. The user might receive a mode message after the TERMIN or TERMING statement is issued. If issued, the mode message might be READY or the name of the command under which the CLIST was invoked. (When READY is displayed, users might think the CLIST has terminated. You may want to avoid any confusion by telling them otherwise in the WRITE statement that precedes the TERMIN or TERMING statement.)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014