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


Executing CLISTs

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

To execute a CLIST, use the EXEC command. From an ISPF command line, type TSO in front of the command. In TSO/E EDIT or TEST mode, use the EXEC subcommand as you need to use the EXEC command. (CLISTs executed under EDIT or TEST can issue only EDIT or TEST subcommands and CLIST statements, but you can use the END subcommand in a CLIST to end EDIT or TEST mode and allow the CLIST to issue TSO/E commands.)

The EXEC command (or subcommand) has two forms:

  1. Explicit form: Enter "exec" or "ex" followed by the data set name and the optional CLIST operand. By default, the EXEC command assumes that the data set type is CLIST and automatically suffixes all specified names with .CLIST, unless the name is in quotation marks. For example:
    • If a CLIST, LISTPGM, is a member of a PDS named PREFIX.CLISTLIB.CLIST, enter:
      {exec}  clistlib(listpgm)   [CLIST]
      {ex  }
    • If a CLIST, LISTPGM, is a member of a PDS named PREFIX.CLIST, enter:
      {exec}  (listpgm)       [CLIST]
      {ex  }
    • If the CLIST is in a sequential data set named PREFIX.LISTPGM.CLIST, enter:
      {exec}  (listpgm)       [CLIST]
      {ex  }
    • If the CLIST is in a sequential data set named PREFIX.LISTPGM, enter:
      {exec}  'prefix.listpgm'    [CLIST]
      {ex  }

    If the EXEC command is used to execute a CLIST in a sequential data set, but the data set is found to be a partitioned one, it will assume a member TEMPNAME. The system will notify you if this member is not found, otherwise it will execute it.

  2. Implicit form: Enter only the name of the CLIST, optionally preceded by a percent sign (%). The CLIST must be a member of a PDS allocated to the file SYSPROC, or an alternative library specified with the ALTLIB command. The two implicit forms are as follows:
    1. Enter only the member name, for example:
      listpgm
      When you use this form, TSO/E first searches command libraries to ensure that the name you entered is not a TSO/E command, then searches CLIST libraries:
      • Specified with the ALTLIB command or
      • Allocated to the SYSPROC file
    2. Enter the member name prefixed with a percent sign (%), for example:
      %listpgm

      When you use this form, called the extended implicit form, TSO/E searches only the ALTLIB or SYSPROC libraries for the name, thus reducing the amount of search time.

    For information about preparing a CLIST for implicit execution, see Allocating CLIST libraries for implicit execution.

You can execute a CLIST in either the foreground (from your terminal) or in the background (submit it as a batch job). You can also execute a CLIST from another CLIST (using the EXEC command) or from a program. To invoke a CLIST from a program, use the TSO/E service facility described in z/OS TSO/E Programming Services.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014