Proxy CL commands
Proxy commands are used to create shortcuts to target CL commands.
A proxy command differs from a typical IBM i command in its ability to run a target command, rather than a command processing program.
Use the Create Proxy Command (CRTPRXCMD) to
create a proxy command. Create Proxy Command (CRTPRXCMD) requires
a Command name (CMD) and a Target command
(TGTCMD). Optional parameters include a Text description
(TEXT), Authority (AUT) and a Replace
command (REPLACE) option. For example, to create a proxy
command that has a target command of QSYS/DSPJOB, enter the following
command:
CRTPRXCMD CMD(MYLIB/PCMD1) TGTCMD(QSYS/DSPJOB) TEXT(‘dspjob
proxy')
Specifying a proxy command for the TGTCMD parameter is allowed. A proxy chain can be up to five proxy commands in length, ending with a sixth non-proxy command. Running a proxy command with a chain of more than five proxy commands causes a CPD0196 error “Number of chained proxy commands exceeds 5.”
When you create a proxy command, you do not specify command definition source. A proxy command does not contain any parameter information, prompt control information, or inter-parameter dependency information. When a proxy command is used, all that information is inherited from the target command defined in the proxy command. You specify all the same parameters for the proxy command that you would for the target command.
If you change the command default for a proxy command,
the default is changed for the target command and any other proxy commands
for the target command.
Some IBM-supplied commands in library QSYS are proxy commands for commands in
other libraries.
If you want a version of an IBM-supplied command with different defaults,
copy the target command of the proxy command
instead of copying the proxy command.
See Changing CL command defaults.

Use the Change Proxy Command (CHGPRXCMD) command to change a proxy command. Use the Delete Command (DLTCMD) command to delete a proxy command.
To run or process a command that is resolved to through a proxy chain, the user must have the correct authority for that command and library. The user must also have *USE authority for each of the proxy commands and libraries in the proxy command chain.
Since proxy commands run other commands, attempting to register an exit program for a proxy command is not allowed. Attempting to register an exit program for a proxy command causes error message CPF019A to be issued. When a proxy command is run and the non-proxy command that it resolves to has a registered exit program, the proxy chain that was followed is placed in the RTVC0100 or CHGC0100 returned format data.