Identifying key parameters for a CL command
The number of key parameters should be limited to the number of parameters that is needed to uniquely define the object that is to be changed.
To ensure that a key parameter is coded correctly in the command definition source, consider these requirements:
- Specify KEYPARM(*YES) on the PARM statement in the command definition source.
- Define all parameters that specify KEYPARM(*YES) before all parameters
that specify KEYPARM(*NO). Note: If a PARM statement specifies KEYPARM(*YES) after a PARM statement that specifies KEYPARM(*NO), the parameter is not treated as a key parameter and a warning message is issued.
- Do not specify a MAX value greater than one in the PARM statement.
- Do not specify a MAX value greater than one for ELEM statements associated with key parameters.
- Do not specify *PMTRQS or a prompt control statement for the PMTCTL keyword on the PARM statement.
- Place key parameters in the command definition source in the same order you want them to appear when prompted.