Use the CMD statement

When you define a command, you must include one and only one CMD statement with your command definition statements.

When you define a command, you can provide command prompt text for the user. If the user chooses to be prompted for the command instead of entering the entire command, the user types in the command name and presses F4 (Prompt). The command prompt is then displayed with the command name and the heading prompt text on line 1 of the display.

If you want to specify prompt text for the command, use the PROMPT parameter on the CMD statement to specify the heading for the prompt. You then specify the prompts for the parameters, elements of a list, and qualifiers on the PROMPT parameters for the PARM, ELEM, and QUAL statements.

On the PROMPT parameter for the CMD statement, you can specify the actual prompt heading text as a character string 30 characters maximum, or you can specify the message identifier of a message description. In the following example, a character string is specified for the command ORDENTRY.

CMD PROMPT('Order Entry')

Line 1 of the prompt looks like this after the user types in the command name and presses F4.

Order Entry (ORDENTRY)

If you do not provide prompt text for the command you are defining, you only need to use the word CMD for the CMD statement. However, you may want to use the PROMPT keyword for documentation purposes.