Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Profound.js allows you to call any existing IBM i programs, including programs written in CL, RPG, COBOL, and C. You can even call interactive programs, including such as programs that use a green-screen interface or programs that use RPG Open Access to display a Rich User Interface. When a green-screen program is called, the green-screen interface is converted to HTML5 on-the-fly. This capability is provided by Genie.

The calls will maintain a standard IBM i call stack. You can code these calls using a familiar top-down business programming paradigm, without having to code JavaScript asynchronous callbacks. Profound.js can will wait for the programs called program to complete (even when a user interface is involved) without blocking the Node.js event loop. The call is then gracefully returned to Node.js processing. This capability is provided through Fibers.

...

Code Block
languagejavascript
pjs.call("PROGRAM");

 


Parameters

Passing parameters is very simple with Profound.js because of support for Strongly Typed Fieldstyped fields. You can simply define a parameter field using the IBM i data type expected by the program you are calling. For example:

...

Parameters can be passed by reference (or both input and output), meaning that the called program can change the values of fields defined within your Node.js code.