1. litmis
  2. Open Source Projects for IBM i
  3. poormanscompilerpgfrompase

Overview

HTTPS SSH

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.

Install

$ git clone git@bitbucket.org:litmis/poormanscompilerpgfrompase.git
$ cd poormanscompilerpgfrompase

Usage

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
OpenSys/litmis/spaces/GUID/chroot/home/User/qsys_compile/pgm1.rpgle')</success>
</cmd>
<cmd exec='cmd' error='fast'><success>+++ success CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chr
oot/home/User/qsys_compile/pgm2.rpgle')</success>
</cmd>
</myscript>
[
    {
        "type": "cmd",
        "success": true,
        "cmd": "CRTBNDRPG PGM(LIB/PGM1) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/qsys_compile/pgm
1.rpgle')"
    },
    {
        "type": "cmd",
        "success": true,
        "cmd": "CRTBNDRPG PGM(LIB/PGM2) SRCSTMF('/QOpenSys/litmis/spaces/GUID/chroot/home/User/qsys_compile/pgm
2.rpgle')"
    }
]

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.