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


Using diagnostic options of the CONTROL statement

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

The CONTROL statement lets you define processing options for a CLIST. Some of the CONTROL statement options can help you diagnose CLIST errors. These diagnostic options, LIST, CONLIST, SYMLIST, and MSG, cause a CLIST to display its statements, commands, and any informational messages at the terminal when you execute the CLIST. From the displayed information, you can often find statements or commands that contain errors.

You can use the diagnostic options separately or together on the CONTROL statement. To obtain the most complete diagnostic information, code the options together (the order is not significant):
CONTROL LIST CONLIST SYMLIST MSG
You can place the CONTROL statement at the top of the CLIST or in any part of the CLIST that you want to test or debug. Each CONTROL statement overrides any previous CONTROL statements. To turn off the diagnostic options, type:
CONTROL NOLIST NOCONLIST NOSYMLIST NOMSG

As an alternative to retyping the CONTROL statement when you want to change options, you can use the control variables &SYSLIST, &SYSCONLIST, &SYSSYMLIST, and &SYSMSG to test or change the current settings. For more information about using these control variables, see Setting options of the CLIST CONTROL statement.

The diagnostic options have the following effects:
SYMLIST
The CLIST displays each TSO/E command, subcommand, or CLIST statement at the terminal before scanning it for symbolic substitution.
LIST
The CLIST displays each TSO/E command or subcommand at the terminal after symbolic substitution but before execution.
CONLIST
The CLIST displays each CLIST statement at the terminal after symbolic substitution but before execution.
MSG
The CLIST displays informational messages at the terminal.
Note: SYMLIST and CONLIST do not display the GLOBAL or NGLOBAL statements.

The CLIST in Figure 1 contains diagnostic options on the CONTROL statement. When you execute the CLIST, the commands and statements appear at the terminal as shown in Figure 2.

Figure 1. Sample CLIST with diagnostic CONTROL options
CONTROL LIST CONLIST SYMLIST MSG
SET INPUT = data.set.name
SET DSN = &INPUT;
allocate file(a) dataset('myid.&dsn')
free file(a)
 
Figure 2. Diagnostic output from sample CLIST
SET INPUT = data.set.name
SET INPUT = data.set.name
SET DSN = &INPUT;
SET DSN = data.set.name
allocate file(a) dataset('myid.&dsn')
allocate file(a) dataset('myid.data.set.name')
free file(a)
free file(a)
 

Notice that each statement and command appears twice at the terminal. The first version is caused by CONTROL SYMLIST and shows the statement or command as it appears in the CLIST. The second version shows the results of symbolic substitution on the preceding line. If a line undergoes no substitution (contains no variables), both versions are the same.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014