Create user-defined commands

Users can define a command by entering command definition statements into a source file and running a Create Command (CRTCMD) command using the source file as input.

The command definition statement of each command contains one or more command statements.

One and only one Command (CMD) statement must be somewhere in the source file. A Parameter (PARM) statement must be provided for each parameter that appears on the command being created. Complex parameters can be defined by using Element (ELEM) statement and Qualifier (QUAL) statement to define the parts of the parameter. If any special keyword relationships need checking, the Dependent (DEP) statement is used to define the relationships. The DEP statement can refer only to parameters that have been previously defined. These statements can appear in any order. Prompt Control (PMTCTL) statements can be used to selectively prompt command parameters.

Only one command can be defined in each source member in the source file. The Create Command (CRTCMD) command is run to create the command definition object from the command definition statements in one source file member. Other users can then be authorized to use the new command by the Grant Object Authority (GRTOBJAUT) command or the Edit Object Authority (EDTOBJAUT) command.