Versions Compared

Key

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

Sometimes it's convenient to develop PJS applications in an a PJS instanced instance installed on your PC, before deploying to a network server or IBMi system. This tip documents how to use command PJSCALL to call a "regular" (i.e. NOT low-code) PJS module on your PC from an IBMi system.

In the following example, we'll create a "regular" (i.e. NOT low-code) PJS module in your PJS instance on your PC, call it passing with 2 input parameters, and see the output in the console log.

  • Navigate to the workspace "pjstips".
  • Click New/Javascript File.
  • Enter the code below. Click Save As, and save as pjstips_07_1.js. Note that this is very simple code, as an example. You can do anything you want here (e.g. use various PJS API's such as pjs.define(), call pjs.query() to get data, use pjs.call() to call an IBMi program, etc).

...