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


Entering input after a TERMIN or TERMING statement

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

The user can optionally enter input when returning control by appending the input to the string that returns control. The CLIST stores the input in the &SYSDVAL control variable, which the CLIST can then access by executing a READDVAL statement. The READDVAL statement changes the input to uppercase, unless you code CONTROL ASIS in the CLIST.

Suppose a WRITE statement prompts the user to inform the CLIST, when returning control after a TERMIN or TERMING statement, if any data sets should be deleted. The user affirms the request by entering the following:
PROCESS JCL.CNTL(BUDGT) ACCOUNT.DATA
The following CLIST deletes the data sets in the previous statement:
WRITE Check your catalog and enter the names of
WRITE up to two data sets you want deleted.
WRITE They must be separated by a comma or blank and
WRITE the first name must be preceded by the word PROCESS
WRITE and a blank.  If you do not want to delete any data
WRITE sets, type in the word IGNORE.  If you want to end
WRITE the CLIST, type in TERMINATE.
TERMIN IGNORE,PROCESS,TERMINATE
/* Read the two data set names (if any) in &SYSDVAL into
/* variables called &DSN1 and &DSN2
READDVAL DSN1 DSN2
/* If the user wants to delete data sets (PROCESS),
/* delete them
IF &SYSDLM = 2 THEN + 
 DO
  IF &DSN1¬=   THEN + 
   delete &DSN1
  IF &DSN2¬=   THEN + 
   delete &DSN2
 END
/* If the user wants the CLIST to ignore the deletion request
/* but continue processing, execute  the rest of CLIST.  The
/* null ELSE path covers the request to terminate immediately.
IF &SYSDLM = 1 THEN + 
 DO
   (Rest of CLIST)
 END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014