Chapter Contents

Previous

Next
Command Directory

install

Assign or List User-Defined Commands

ABBREVIATION
in{stall}

FORMATS
Format 1: install COMMAND-NAME as EXEC-NAME 2 [LENGTH]
Format 2: install COMMAND-NAME drop
Format 3: install *

DESCRIPTION
The install command enables you to define commands, thus, tailoring the debugger to meet your specific need or to emulate the commands of other debuggers. Your commands execute a CLIST or EXEC, which actually contains the code for your user-defined command. No checking for the existence of the CLIST or EXEC is made at the time the install command is issued.

Format 1: This format of the install command is used to define a command. When defining a command, the COMMAND-NAME argument indicates the name of your command and the EXEC-NAME argument is the name of a CLIST or EXEC that is executed when your new command is invoked.

The LENGTH argument is used to specify a short form for your command. If specified, LENGTH is the minimum number of characters in COMMAND-NAME that can be used as a short form of the command. For example, if you installed a command name start, specifying 2 as the LENGTH argument, your command could be invoked by entering the characters st, sta, star, or start.

Format 2: This format is used to remove a command from the debugger's list of user-defined commands.

Format 3: This format lists all user-defined commands. The COMMAND-NAME, EXEC-NAME, and LENGTH are displayed.

User-defined commands are placed in a list that is searched before the debugger's command list. If you attempt to use the install command to define a command that creates a conflict with an existing user-defined command, a message is displayed and the definition is not made.

It is possible for user-defined commands to have the same name or short form as debugger commands. If you create a user-defined command with the same name as a debugger command, you can invoke the native debugger command by prefixing the command with the debugger escape character, a backslash (\).

User-defined commands can invoke other user-defined commands; however, the debugger makes no attempt to identify user-created loops.

When you invoke a user-defined command, you can pass arguments to your CLIST or EXEC by typing them on the same line following your command. For example, suppose that you have defined a command that invokes a CLIST named MYCOMMAND that takes two arguments, ARG1 and ARG2. This user-defined command can be issued from the command line or the Command window as follows:
mycommand arg1 arg2

As is the case with the exec and % commands, no other commands can follow a user command on the same line. However, a command can precede the user-defined command. Similarly, no other debugger command can be issued on the same line as the user-defined command when it is used as an argument to the on command (but you can use another command following the user-defined command on a separate line). Any commands following the user-defined command on the same line are treated as arguments to the user-defined command.

EXAMPLES

install mycommand as myexec 2
defines a command named mycommand that will invoke a CLIST or EXEC named MYEXEC. The 2 establishes my as the short form for this command.

install mycommand drop
removes, or drops, mycommand from the debugger's list of user-defined commands.

install *
displays a list of all user-defined commands.

SYSTEM DEPENDENCIES
TSO: Your user-defined command invokes a CLIST or REXX EXEC as previously described for the % command. When you invoke your user-defined command, it is executed in the same manner as it would be if you had invoked the CLIST or EXEC with the % command. All restrictions that apply to CLISTs and EXECs executed by the % command also apply to CLISTs and EXECs executed by user-defined commands.

CMS: The user-defined command executes the EXEC specified by the argument EXEC-NAME. This file must have filetype CDEBUG. The EXEC is executed with a default subcommand environment of CDEBUG. See the IBM publication VM/ESA V2R4.0 REXX/VM Reference SC24-5770 for a detailed explanation of subcommand environments.

When you invoke your user-defined command, it is executed in the same manner as it would be if you had invoked the EXEC with the exec command. All restrictions that apply to EXECs executed by the exec command also apply to EXECs executed by user-defined commands.

COMMAND CAN BE ISSUED FROM

PROFILE yes
configuration file no
Source window prefix none

SCOPE
The install command is not affected by changes in scope.

RETURN CODES SET
Successful: 0
Unsuccessful: 1

SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.