Saturday, August 08, 2026

IBM i Proxy CL Commands - What's In a Short Name

I was over on the PUB400 site and just read a forum entry discussing making copies of system commands. Because PUB400 is very secure it's not possible to copy system command definitions so a few alternatives were pointed out. I used to make system shortcut command copies, but in recent years I have typically not done this because things can get messed up between releases if you don't update your shortened versions and keep track of the changes in a document or another common CL program that can make the updates for you by re-copying the commands between releases. It's not that onerous, but over the years I have learned to just work with the available system commands or write my own commands to do get things done. I didn't realize there was an easier way to use an existing CL command under a different name. The concept is called Proxy CL Commands

A quick summary is that a proxy CL command is essentially a CL command that is a pointer to another existing CL command, but it can have another name and has an attribute value of: *PRX. 

In the early days of my programming journey it was always nice to have shortcuts of my favorite commands like: WRKACTJOB or WRKSPLF. As an example I would create a copy of the WRKACTJOB command named WAJ as a shortened version and place it in my own library or a shared command library that other users could utilize as well. This concept really started for me back in the System/36 days when I used to program with POP, which was kind of the predecessor to PDM. And back then we didn't have a mouse, trackpad or touch screen like we do on modern laptops and desktops.

For my WRKACTJOB proxy command example, I simply ran the CRTPRXCMD CL command with a couple parameters and that's all it took. 

Ex: CRTPRXCMD CMD(QGPL/WAJ) TGTCMD(QSYS/WRKACTJOB)

The new WAJ command works exactly like the WRKACTJOB, including passing parameters to the CL command. It will accept all the same parameters as WRKACTJOB. 

Pretty nice concept if you want to save your fingers a little typing.  I hope you find some good use for the proxy commands in your own daily work.

Read more about them here:

https://www.ibm.com/docs/en/i/7.5.0?topic=commands-proxy-cl

Samples

https://github.com/richardschoen/howtostuff/blob/master/proxy_cl_commands.md


No comments: