DEFINE ALIAS Statement
Purpose
Use the DEFINE ALIAS statement to define a new alias for an existing CP command on the system during initialization.
You can also define a new alias after initialization by using the DEFINE ALIAS CP command. For more information, see DEFINE ALIAS.
How to Specify
Include as many statements as needed; they are optional. You can place DEFINE ALIAS statements anywhere in the system configuration file. If you specify more than one statement with the same operands, the last operand definition overrides any previous specifications.
Operands
- alias
- is the name of the alias that you are defining. The variable alias must be a 1-character to 12-character string.
- command
- is the name of the existing CP command for which you are creating an alias. The variable command is a 1-character to 12-character string.
- Query SUBCmd subcommand
- tells CP the name of the existing CP QUERY subcommand for which you are creating an alias. The variable subcommand is a 1-character to 12-character string.
- Query Virtual SUBCmd subcommand
- tells CP the name of the existing CP QUERY VIRTUAL subcommand for which you are creating an alias. The variable subcommand is a 1-character to 12-character string.
- Set SUBCmd subcommand
- tells CP the name of the existing CP SET subcommand for which you are creating an alias. The variable subcommand is a 1-character to 12-character string.
- ABBRevlength nn
- is the length of the smallest acceptable abbreviation of the alias that you are defining. The variable nn is a decimal number between 1 and the length of the full alias name.
- DISAble
- tells CP not activate this alias until you enable it. (For more information about enabling aliases, see Usage Note 5.) If omitted, DISABLE is the default.
- ENable
- tells CP to immediately activate this alias.
- IBMclass *
- tells CP to define aliases for all versions of the specified command or subcommand. If omitted, IBMCLASS * is the default.
- IBMclass c
- tells CP to define an alias for a specific version of the specified command or subcommand. The
variable c can be any 1 of the following:
- A
- this is a system-control command to be used by the primary system operator.
- B
- this is a command for operational control of real devices.
- C
- this is a command to alter host storage.
- D
- this is a command for system-wide control of spool files.
- E
- this is a command to examine host storage.
- F
- this is a command for service control of real devices.
- G
- this is a general-use command used to control the functions of a virtual machine.
- 0
- (zero) this command has no specific IBM® class assigned.
Usage Notes
- You can create many aliases for one command, but you cannot create an alias for an alias. For
example, the CP MSG command is actually an alias for the CP MESSAGE command.
+----------+
MSG -----------> | MESSSAGE |
+----------+
You can create another alias for the MESSAGE command.
+----------+
TELL ----------> | MESSSAGE |
+----------+
But you cannot create an alias for MSG.
+----------+
TELL --> MSG --> | MESSSAGE |
+----------+
- If you specify the QUERY, QUERY VIRTUAL, or SET operands, you are creating an alias for a subcommand, not a command. For example, suppose you created alias TUBE for the CP QUERY VIRTUAL GRAF command. To invoke your new alias, you would enter QUERY VIRTUAL TUBE, not QUERY TUBE or just TUBE.
- When specifying an alias name, you can use special characters in the name. However, we do not recommend that you use the pattern matching characters (* and %). You can use these characters to define aliases, but they may seem confusing when you issue other commands that allow you to use the pattern matching characters because CP will interpret the % or * in your alias name as a pattern matching character.
- If you try to define a minimum abbreviation that matches the abbreviation for an existing
command, subcommand, or alias CP rejects your DEFINE statement. For example, if you created a
QUEUE
alias with a minimum abbreviation of 2, CP would reject your QUEUE alias becauseQU
is an abbreviation for the QUERY command. In this case, you would need to specify a minimum abbreviation greater than or equal to 4 because the first 3 characters of QUERY and QUEUE are identical. - If you do not specify the ENABLE operand, the new alias is initially in a disabled state. To activate an alias after you define it, use the ENABLE COMMAND system configuration statement or the ENABLE COMMAND CP command. For information about the ENABLE COMMAND system configuration statement, see ENABLE COMMAND / CMD Statement. For information about the ENABLE COMMAND CP command, see ENABLE COMMAND / CMD.
- To deactivate an alias after you define it, use the DISABLE COMMAND system configuration statement or DISABLE COMMAND CP command. For information about the DISABLE COMMAND system configuration statement, see DISABLE COMMAND / CMD Statement. For information about the DISABLE COMMAND CP command, see DISABLE COMMAND / CMD.
- After an ALIAS NAME is defined, an ALIAS NAME cannot be used again. An ALIAS cannot be modified or eliminated. It can only be disabled. Only a SHUTDOWN or RESTART IPL will eliminate an ALIAS.
- For information about creating an alias, see Defining an Alias Command.
Examples
- To have CP define GOODNIGHT as an alias for the CP SHUTDOWN command and make it available
immediately after initialization, use the following:
Define Alias goodnight For shutdown, /* Goodnight, Gracie! */ AbbrevLength 5, Enable
- To have CP define TELL as an alias for the IBM class
<ANY> version of the CP MESSAGE command and make it available immediately after
initialization, use the following:
Define Alias tell For message, /* Create CP TELL command so users do not */ IBMclass 0, /* get confused when they drop out of CMS */ Enable
- To have CP define NUKE as an alias for all of the IBM
class versions of the CP PURGE command and make it available immediately after initialization, use
the following:
Define Alias nuke For purge, /* Set it up so that users can “nuke” */ IBMclass *, /* instead of “purge” */ Enable