Defining Your Command
In this section we discuss the DEFINE command operands which are unique to command processing.
Some ESMs restrict the usable characters that you may assign to a command name. For example, some ESMs use the underscore character (_) as an operand separator. You should consult your ESM documentation for information on any restrictions that apply to your system.
QUERY CPCMDS QUERY SUBCMD ACCThe resulting output would show that the QUERY ACCOUNT shares the same abbreviation. Thus, 3 characters for an abbreviation of "ACCUMULATOR" would be an illegal choice.
As indicated earlier in this section, if a command has multiple versions (IBM Classes) then all versions of the command must specify the same entry point. The DEFINE COMMAND and MODIFY COMMAND commands will not allow you to violate this requirement. However, if you had previously changed the entry point name associated with a command and defined a new command version using the new entry point name, you would be unwittingly creating a situation where you could not use the RESET option on the MODIFY COMMAND command to restore the CMDBKs to their original state. For this reason, you want to define all versions of a command prior to changing their entry point name to a new name.
Our next step in constructing the DEFINE COMMAND command is to decide when a command may be issued and what IBM classes and user privilege classes should be assigned to the command.
If the version of the command that you are defining is valid before the user has logged on then you can choose BEFORE_LOGON or ANYTIME, depending on whether it is valid after the user ID has logged on. For example, the MESSAGE command has a version that is valid ANYTIME, but the DIAL command is valid only BEFORE_LOGON. If either of these two options are chosen then PRIVCLASSANY must be chosen for the privilege class and this will generate an IBMCLASS of 0.
If the version of the command is valid only after a user has logged on then AFTER_LOGON should be specified. This is also the default. If you do not specify PRIVCLASSANY for this version then you would specify the PRIVCLASSES operand and the IBMCLASS operand. The IBMCLASS operand will define the IBM class to be associated with this version and PRIVCLASSES would define the initial mapping of the IBM class to the user privilege class allowed to issue this version of the command.
The default state for defining a command is that it is disabled. You can override that state by specifying the ENABLE operand or enable it by using the ENABLE COMMAND command.