Skip to content

Installation and Launch

Tom Sharp edited this page Jul 23, 2024 · 6 revisions

Installation

You may either install from a save file, or build from source. See the "Upgrading REPL" section below if you already have the product on your system.

The replwrpr.sh script may be copied directly from the repo into wherever it is required.

Install (with script)

Prerequisite: IBM i Open Source packages

There is a bash script that will download the release from Github and unpack it for you.

  • SSH to your IBM i
  • Download the install script to your current directory:

wget https://raw.githubusercontent.com/tom-writes-code/rpgle-repl/main/install.sh

  • Execute the install script:

bash ./install.sh

  • To see possible installation options, run bash ./install.sh --help

Install (manual)

  • Head to the Github Releases page
  • Transfer the RPGLEREPL.FILE save file to a library on your IBM i
    • If you have direct internet access, you can run this in a shell: wget -v https://github.com/tom-writes-code/rpgle-repl/releases/latest/download/RPGLEREPL.FILE -O "/QSYS.LIB/QGPL.LIB/RPGLEREPL.FILE"
    • Alternatively, download it locally to your PC and FTP/SFTP it to your system
  • Create the target application library: CRTLIB LIB(RPGREPL) TEXT('REPL tool for ILE RPG snippets')
  • Restore the save file objects to that library: RSTOBJ OBJ(*ALL) SAVLIB(REPLBOB) DEV(*SAVF) SAVF(QGPL/RPGLEREPL) ALWOBJDIF(*COMPATIBLE) RSTLIB(RPGREPL)
  • Set the product library on the command object: CHGCMD CMD(RPGREPL/REPL) PRDLIB(RPGREPL)

Building From Source

To build this project, you need to install the Bob build tool. We currently build with v2.3.5.

Then:

  • Clone this repository onto the IFS of your IBM i
  • Set curlib and objlib in iproj.json to the library you wish to hold the built objects
  • From the root directory, run the command makei build

Upgrading REPL

REPL has data that you will likely wish to carry forward to your new installation. To carry this data forward, first rename the library of your existing deployment prior to installation:

e.g. RNMOBJ OBJ(RPGREPL) OBJTYPE(*LIB) NEWOBJ(OLDREPL)

Then the data can be migrated with the following commands:

CPYF FROMFILE(OLDREPL/REPLSRC) TOFILE(RPGREPL/REPLSRC) FROMMBR(*ALL) TOMBR(*FROMMBR) MBROPT(*REPLACE) FMTOPT(*MAP *DROP)

CPYF FROMFILE(OLDREPL/REPLRSLT) TOFILE(RPGREPL/REPLRSLT) FROMMBR(*ALL) TOMBR(*FROMMBR) MBROPT(*REPLACE) FMTOPT(*MAP *DROP)

CPYF FROMFILE(OLDREPL/REPLVARS) TOFILE(RPGREPL/REPLVARS) FROMMBR(*ALL) TOMBR(*FROMMBR) MBROPT(*REPLACE) FMTOPT(*MAP *DROP)

If satisfied, the old application can be deleted:

DLTLIB LIB(OLDREPL)

Launch

Once REPL is installed, you can launch it through the IBM i command REPL.