Create commands

After you have defined your command through the command definition statements, you use the Create Command (CRTCMD) command to create the command.

Besides specifying the command name, library name, and command processing program name for CL or high-level languages (HLL), or the source member, source file, command environment, and exit program for REXX, you can define the following attributes of the command:

For commands with REXX CPPs, you can also specify the following:

The following example defines a command named ORDENTRY to call an order entry application. The CRTCMD command defines the preceding attributes for ORDENTRY and creates the command using the parameter definitions contained in the member ORDENTRY in the IBM-supplied source file QCMDSRC. ORDENTRY contains the PARM statement used in the example under Example: Define a parameter.

CRTCMD     CMD(DSTPRODLB/ORDENTRY) +
           PGM(*LIBL/ORDENT) +
           TEXT('Calls order entry application')

The resulting command is as follows where the value can be DAILY, WEEKLY, or MONTHLY:

ORDENTRY  OETYPE(value)

Once you have created a command, you can:

Related concepts
Use command-related APIs
Related tasks
Example: Define a parameter
Related information
Create Command (CRTCMD) command
CL command finder