Poor Man's Compile RPG From PASE (PMCRFP)

Why? Because I had two hours to come up with something that allowed me to compile RPG from Litmis Spaces. The system command wasn't working so I determined the various language iToolKits could be used. Currently only the Node.js iToolKit is implemented. Hoping community members submit pull requests for Ruby and Python.


$ git clone
$ cd poormanscompilerpgfrompase


First make sure you have a file named compile and add entries like the following, where LIB, GUI, and User should all be replaced with your Litmis Spaces values. Basically any CL command can be put in this file, including the deleting of objects for cleanup.

CRTBNDRPG PGM(LIB/PGM1) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/pgm1.rpgle')
CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/pgm2.rpgle')

Here's the syntax:

$ node|ruby|python compile.js|rb|py [/path/to/compile]

Here's an example:

$ node compile.js
Running: CRTBNDRPG PGM(LIB/PGM1) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/pgm1.rpgle
Running: CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/pgm2.rpgle
<?xml version='1.0'?><myscript><cmd exec='cmd' error='fast'><success>+++ success CRTBNDRPG PGM(LIB/PGM1) SRCSTMF('/Q
<cmd exec='cmd' error='fast'><success>+++ success CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chr
        "type": "cmd",
        "success": true,
        "cmd": "CRTBNDRPG PGM(LIB/PGM1) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/qsys_compile/pgm
        "type": "cmd",
        "success": true,
        "cmd": "CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/qsys_compile/pgm

Note, I didn't specify the optional /path/to/compile parameter so by default it looks for a file named compile in the current directory.