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


Using control variables

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

The CLIST language includes a set of control variables. Control variables provide information about MVS™, TSO/E, and the current session, such as levels of software available, the time of day, and the date. Your CLISTs can use the control variables to obtain such current information.

You code a control variable as you need a symbolic variable. For example, to get the time of day, your CLIST can use the control variable &SYSTIME as follows:
WRITE It's &SYSTIME
If your CLIST was executing at 2:32:58 PM, the result need to be:
It's 14:32:58

You do not have to define control variables. Control variables have constant names; you refer to the variable name to obtain information.

Control variables to which you can assign values are called modifiable control variables. The variable &SYSOUTTRAP is an example of a modifiable control variable. &SYSOUTTRAP tells how many lines of TSO/E command output should be saved in a CLIST. If you want to save 100 lines of output from each TSO/E command in your CLIST, you can set &SYSOUTTRAP to 100, as follows:
SET &SYSOUTTRAP = 100
Your CLIST need then be able to retrieve and process up to 100 lines of output from each command in the CLIST. If you did not want to save output from some commands, you need to reset &SYSOUTTRAP to zero before issuing those commands.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014