Change Proxy Command (CHGPRXCMD)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change Proxy Command (CHGPRXCMD) command changes some of the attributes of a proxy command. Control Lanuage (CL) programs that use the proxy command being changed do not have to be created again. The CHGPRXCMD command does not change the target command definition object.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
CMD Command Qualified object name Required, Key, Positional 1
Qualifier 1: Command Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TGTCMD Target command Single values: *SAME
Other values: Qualified object name
Optional, Positional 2
Qualifier 1: Target command Name
Qualifier 2: Library Name, *LIBL, *CURLIB, *SYSTEM, *NLVLIBL
TEXT Text 'description' Character value, *SAME, *BLANK, *TGTCMD Optional
Top

Command (CMD)

Specifies the proxy command to be changed.

This is a required parameter.

Qualifier 1: Command

name
Specify the name of the proxy command to be changed.

Qualifier 2: Library

*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.
name
Specify the name of the library where the command is located.
Top

Target command (TGTCMD)

Specifies the target command for this proxy command. All parameters specified for the proxy command will be validated and processed using the specified target command.

Single values

*SAME
The target command does not change.

Qualifier 1: Target command

name
Specify the name of the target command that processes the command.

Qualifier 2: Library

*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.
*SYSTEM
Only the QSYS library is used to locate the command. If an exit program is registered for the QIBM_QCA_CHG_COMMAND exit point, the exit program will be allowed to change the command.
*NLVLIBL
Only the national language version (NLV) libraries in the library list and the QSYS library will be searched for the command. If an exit program is registered for the QIBM_QCA_CHG_COMMAND exit point, the exit program will be allowed to change the command.
name
Specify the name of the library where the command is located.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*SAME
The text, if any, does not change.
*TGTCMD
The text description of the target command will be used as the text description of the proxy command. If the target command does not exist when this command is run, the text description of the proxy command will be the qualified name of the target command.
*BLANK
No text is specified.
'description'
Specify no more than 50 characters, enclosed in apostrophes.
Top

Examples

CHGPRXCMD CMD(QGPL/WRKJOB) TGTCMD(QSYS/DSPJOB)
          TEXT('Alias WRKJOB to DSPJOB')

The proxy command named WRKJOB in library QGPL is changed to use DSPJOB in QSYS as the target command. When the QGPL/WRKJOB command is run or prompted, the target command DSPJOB in the QSYS library will be used to process the WRKJOB command parameters.

Top

Error messages

*ESCAPE Messages

CPF6209
Library &1 not found.
CPF6210
Command &1 in library &2 not found.
CPF6211
Not authorized to change command &1.
CPF6212
Command &1 not changed.
CPF6213
Cannot allocate command &1 in library &2.
CPF6214
Errors detected while changing command &1.
CPF6215
Command &1 in library &2 cannot be changed.
CPF6216
Command &1 not valid for &2 command
CPF6219
Not authorized to library &2.
Top