USE command

The USE command causes the z/OS® Debugger commands in the specified file or data set to be either performed or syntax checked. This file can be a log file from a previous session. The specified file or data set can itself contain another USE command. The maximum number of USE files open at any time is limited to eight. The USE keyword cannot be abbreviated.

Read syntax diagramSkip visual syntax diagramUSEddnamedsname;
ddname
A valid ddname in z/OS.
dsname
A z/OS data set containing the z/OS Debugger commands to be performed. If dsname is not enclosed in apostrophes ('), z/OS Debugger assumes it is a partially-qualified data set name and the user ID is prefixed to form the fully-qualified data set name.

Usage notes

  • To check the syntax of the commands in a USE file:
    1. Set the EXECUTE setting to OFF.
    2. Enter a USE command for the file.
  • Commands read from a USE file are logged as comments.
  • The log file can serve as a USE file in a subsequent z/OS Debugger session.
  • Recursive calls are not allowed; that is, a commands file cannot be used if it is already active. This includes the primary commands and preferences files. If another invocation of z/OS Debugger occurs during the execution of a USE file (for example, if a condition is raised while executing a command from a USE file), the USE file is not used for command input until control returns from the condition.
  • The USE file is closed when the end of the file is reached.
  • If a nonreturning command (such as GO) is performed from a USE file, the action taken (as far as closing the USE file) depends on certain things:
    • If the USE file was called directly or indirectly from the primary commands file or preferences file, it has the same characteristics as the primary commands file or preferences file. That is, it "keeps its place" and the next time z/OS Debugger requests a command, it reads from the USE file where it left off.
    • If the USE file was not called directly or indirectly from the primary commands file or preferences file, the rest of the USE file and the file that called the USE file is skipped.
  • If the end of the USE file is reached without encountering a QUIT command, z/OS Debugger returns to the command source where the USE command was issued. This can be the terminal, a command string, or another commands file.
  • A USE file takes on the aspects of whatever command source issued the USE command, relative to its behavior when a GO, GOTO, or STEP is executed. When called from the primary commands file, it continues with its next sequential command at the next breakpoint. If it is called from any other command sequence, the GO, GOTO, or STEP causes any remaining commands in the USE file to be discarded.

Examples

  • Perform the z/OS Debugger commands in the z/OS data set USERID.COMMANDS.FILE. The data set must first be allocated with, for example, ALLOC FI(MYCMDS) DA('USERID.COMMANDS.FILE').
    USE MYCMDS;
    Alternatively, perform the commands in the z/OS data set USERID.COMMANDS.FILE.
    USE COMMANDS.FILE
  • On z/OS, perform the z/OS Debugger commands in the partitioned data set member USERID.PDS(CMDS).
    USE PDS(CMDS)
  • For CICS®, perform z/OS Debugger commands in the fully-qualified data set TS64081.USE.FILE.
    USE 'TS64081.USE.FILE';
    In addition to using sequential files, you can perform z/OS Debugger commands using partitioned data sets.
    USE 'userid.thing.file(usefile)'