About Proxy Programs

A Proxy Program object automatically transfers control to a Profound.js module that is named the same as the Proxy Program and is located in the same modules subdirectory as the library in which the Proxy Program is located. All parameters passed to the Proxy Program are automatically passed along to the Profound.js module. Parameters can be passed by reference or by value. Proxy Programs typically replace the object of a converted RPG program.

While a Proxy Program holds no application logic within itself, it offers the following benefits:

Creating Proxy Programs

You can create a Proxy Program object by using the PJSCRTPRXY command located within your Profound.js installation library. The command takes the following parameters:

Once the object is created, you can work with it like any other program object. For example, you can use the WRKOBJ (Work with Objects) command to locate it. Or, you can use the EDTOBJAUT (Edit Object Authority) command to modify the program's authority settings.

Calling Proxy Programs

You can call a Proxy Program from Genie by using the standard CALL command or by selecting the option that called the original RPG program that you've now replaced with the Proxy Program. This will invoke the respective Node.js module. The Node.js script may either present an interactive user interface or just perform back-end business logic, in which case control is immediately passed back to Genie after the Node.js script finishes executing.

Before calling the Proxy Program, your library list should include libraries PROFOUNDUI and PROFOUNDJS or their equivalents if you installed Profound UI and Profound.js into non-default libraries.

Video Tutorial

<div align="center" style="position:relative;height:360;width:640"><iframe width="640" height="360" src="https://www.youtube.com/embed/datt2wCiROI" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe></div>