Command reference / prog

CHGCMD

Change Command

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 in which the command can be processed, and the text description of the command. CL programs that use the command being changed do not have to be created again.

Allowed environments: *ALL. Positional parameters: 1.

Restrictions

Parameters

CMD Command

Specifies the command to be changed. The command can be either a user-defined command or an IBM-supplied command. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the command. If no library is specified as the current library for the job, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Command Command

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

ALLOW Where allowed to run

Specifies where the command can be processed.

Type
*CHAR
Required
No
Default
*SAME
Length
9
List limit
9
Case
Uppercase

Allowed values: *SAME, *ALL, *BATCH, *INTERACT, *BPGM, *IPGM, *BREXX, *IREXX, *EXEC, *BMOD, *IMOD

*SAME
The environment in which the command can be processed does not change.
*ALL
The command can be processed in a batch input stream, in a CL program, in a REXX procedure, in a CL ILE module, or when processed interactively.
*BATCH
The command can be processed in a batch input stream, external to a compiled CL program.
*INTERACT
The command can be processed interactively, external to a compiled CL program.
*BPGM
The command can be processed in a compiled CL program that is called from batch entry.
*IPGM
The command can be processed in a compiled CL program that is called from interactive entry.
*BREXX
The command can be used in a REXX procedure run in a batch job.
*IREXX
The command can be used in a REXX procedure run in an interactive job.
*BMOD
The command can be used in a batch CL ILE program only.
*IMOD
The command can be used in an interactive CL ILE program only.
*EXEC
The command can be used as a parameter on the CALL command and passed to QCMDEXC for processing.

ALWLMTUSR Allow limited users

Specifies whether the command can be entered from the command line on a menu by a user whose profile is set for limited capabilities.

Type
*CHAR
Required
No
Default
*SAME
Length
4
Case
Uppercase

Allowed values: *SAME, *NO, *YES

*SAME
The limited user authority does not change.
*NO
This command cannot be entered from the command line on a menu by a user with limited capabilities.
*YES
This command can be entered from the command line on a menu by a user with limited capabilities.

TEXT Text 'description'

Specifies the text that briefly describes the object.

Type
*CHAR
Required
No
Default
*SAME
Length
50
Case
Mixed case

Suggested / special values: *SAME

*SAME
The text, if any, does not change.
*CMDPMT
The text description will be the same as the command title shown when the command is prompted.
*BLANK
No text is specified.

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.

IBM command documentation

Generated from os/cl/catalog/CHGCMD.json and os/cl/help/CHGCMD.json.