RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Making Command shortcuts using CRTPRXCMD Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

Creating a proxy command is much simpler than creating a regular command. The Create Proxy Command (CRTPRXCMD) command only requires a command name (CMD parameter) and a target command name (TGTCMD parameter). Optional parameters include the text description you want the proxy command to have (TEXT parameter), default public authority for the proxy command (AUT parameter), and whether you want the proxy command to replace an existing command by the same name in the specified library (REPLACE parameter).


CRTPRXCMD CMD(MYLIB/JOB) TGTCMD(QSYS/DSPJOB)
    TEXT('DSPJOB proxy')

Running the JOB command in library MYLIB will cause the target command DSPJOB in library QSYS to run.


The target command for a proxy command could also be a proxy command instead of a regular command. If so, the operating system will get its target command and, if it's a regular command, run it. Linking a proxy command to another proxy command forms a proxy-command chain, which can be up to five proxy commands in length, ending with a sixth regular target command. Trying to run a proxy command with a chain of more than five proxy commands causes a CPD0196 error ("Number of chained proxy commands exceeds 5.")


<Previous   Next>