I created the PHPRUN command a few months back when I started learning PHP. 

I always like to see what else a scripting language is capable of when I am testing. 

I figured since we use QSH and PASE all over the board, then PHP should be able to participate in this mix. 

Feel free to download and use the PHPRUN command.  Source code is included for the CL script if you want to modify and enhance it. 

There’s also a README source member in the source file RJSPHP/SOURCE

Basically the PHPRUN command will run any PHP script with parameters and will allow you to send output back to the regular 400 job by placing STDOUT into a physical *OUTFILE and rolling through the file and processing results. This is a great way to intermix, RPG, CL and PHP. The command also bubbles back the PHP return codes to a data area so you can monitor for a successful script completion from a CL or RPG program. 

PHPRUN Command Download  – Contains RJS FTP Library Installer for RJSPHP library http://downloads.rjssoftware.com/files/commonclasses/rjsphp/rjsphp.exe

REQUEST: If you make any changes or tweaks to the scripts or add any additional functionality, please send them to me so I can incorporate them into the library. I already have several ideas for how to make this more useful, but let’s have some outside input. 

Have fun and send your feedback to me via email.  richard@rjssoftware.com