Command definition statements

Command definition allows system users to create additional commands to meet specific application needs.

These commands are similar to the system commands. The defined command calls a program to perform some function. Users can define commands by using command definition statements. The defined command can include the following:

Each command on the system has a Command definition object and a command processing program (CPP).

The CPP is the program called when the command is entered. Because the system performs validity checking when the command is entered, the CPP does not always have to check the parameters passed to it.

The command definition functions can be used to:

Table 1. Statements for Defining CL Commands
Statement Type Statement Name Related command Description
Command CMD Command Definition (CMD) command Specifies the prompt text for the command being created. The CMD statement can be anywhere in the source file referred to by the Create Command (CRTCMD) command; one and only one CMD statement must be used in the source file, even if no prompt text is specified for the created command.
Parameter PARM Parameter Definition (PARM) command Defines a parameter of a command being created. A parameter is the means by which a value is passed to the command processing program (CPP). One PARM statement must be used for each parameter that appears in the command being defined.
Element ELEM Element Definition (ELEM) command Used to define the elements of a mixed list (list elements) parameter on a command. A list parameter is a parameter that accepts multiple values that are passed together as consecutive values pointed to by a single keyword.
Qualifier QUAL Qualifier Definition (QUAL) command Describes one part of a qualified name. If a name is the allowed value of a parameter or list element defined in a PARM or ELEM statement, it can be changed to a qualified name by using a QUAL statement for each qualifier used to qualify the name.
Dependency DEP Dependent Definition (DEP) command Defines a required relationship between parameters and parameter values that must be checked. This relationship can refer to either the specific value of a parameter or parameters or to the required presence of parameters.
Prompt Control PMTCTL Prompt Control Definition (PMTCTL) command Specifies a condition that is tested to determine if prompting is done for the parameters whose PARM statement refers to the PMTCTL statement.
Related concepts
Command delimiters
Simple and qualified object names
Command coding rules
Command definition parts
Naming within commands
Command definition object
Related tasks
Use prompt control
Document commands
Related information
Integrated file systems