Start of change

Proxy commands

Use proxy commands to create shortcuts to target commands.

A proxy command differs from a typical i5/OS™ 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 5 proxy commands in length, ending with a 6th non-proxy command. Running a proxy command with a chain of more than 5 proxy commands will cause 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 interparameter dependency information. When a proxy command is used, all of 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.

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” via a proxy chain, the user must have the correct authority for that command and library, as well as *USE authority for each of the proxy commands (and libraries) in the chain.

Since proxy commands run other commands, attempting to register an exit program for a proxy command is not allowed, and will cause the 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 will be placed in the RTVC0100 and/or CHGC0100 returned format data.

Related information
Create Proxy Command (CRTPRXCMD) command
Change Proxy Command (CHGPRXCMD) command
Delete Command (DLTCMD) command
End of change