Write a command processing program or procedure

A command processing program (CPP) is a program that processes a command. This program performs some validity checking and processes the command so that the requested function is performed.

A command processing program (CPP) can be a CL or HLL program, or a REXX procedure. Programs written in CL or HLL can also be called directly with the Call (CALL) command. REXX procedures can be called directly using the Start REXX Procedure (STRREXPRC) command. The command processing program does not need to exist when the Create Command (CRTCMD) command is run. If *LIBL is used as the library qualifier, the library list is used to find the command processing program when the created command is run.

Messages issued as a result of running the command processing program can be sent to the job message queue and automatically displayed or printed. You can send displays to the requesting display station.

Note:
  1. The parameters defined on the command are passed individually in the order they were defined (the PARM statement order).
  2. Decimal values are passed to HLL and CL programs as packed decimal values of the length specified in the PARM statement.
  3. Character, name, and logical values are passed to HLL and CL programs as a character string of the length defined in the PARM statement.
Related information
Create Command (CRTCMD) command
Call (CALL) command
Start REXX Procedure (STRREXPRC) command