CL Command Reference - CHGCMD

CL Command List > CHGCMD Reference

Description:

The Change Command (CHGCMD) command changes some of the attributes of a command definition. The command gives you the ability to specify a different command processing program to process the command. You can also change the type of operating environment (production, debug, or service) in which the command can be processed, and the text description of the command. CL programs that use the command being changed by the Change Command (CHGCMD) command do not have to be created again. The Change Command (CHGCMD) command does not change the parameter descriptions or validity checking information in the command definition object.

Restrictions:

1. The user must have object management authority for the command that is being changed.

2. The CHGCMD command can be used to change only the attributes of a created CL command. That is, those attributes that were specified on the Create Command (CRTCMD) command. The CHGCMD command cannot be used to change attributes of statements, such as command definition statements.

3. The CHGCMD command should not be used to change the command processing program (PGM parameter), the validity checking program (VLDCKR parameter), or the prompt override program (PMTOVRPGM parameter) of an IBM-supplied command.

4. If the CHGCMD command is used to change the command processing program (PGM parameter), the validity checking program (VLDCKR parameter), or the prompt override program (PMTOVRPGM parameter), the threadsafe attribute of the command will be set to *NO. You must use the Create Command (CRTCMD) command to set the threadsafe attribute to *YES or *COND.


Examples:

CHGCMD CMD(PAYROLL) VLDCKR(LIB01/PAYVLDPGM)

The validity checking program for the PAYROLL command is the program named PAYVLDPGM located in library LIB01. All other attributes of the PAYROLL command remain the same.