Versions Compared

Key

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

...

  • This is in the format of a "regular" (i.e. NOT low-code) PJS module. It's also NOT a module meant to be called as an Express Route (web service) as in the example here; e.g. it does NOT have the "req" and "res" parameters. Instead, it has zero or more "usual" parameters that you can pass to the module, either from another PJS module or from command PJSCALL.
  • You can call this module from an IBMi green-screen, using the command PJSCALL. The green-screen session could be a Genie session, but it does NOT have to be. A Genie session is required only if the PJS module uses an RDF (Rich Display File).
  • We'll use command PJSCALL (*CMD object) to call this PJS module. (It's NOT the program PJSCALL (*PGM object) that's used to call low-code modules. This could be a source of confusion. We'll clarify it further in a future tip.)
  • On your IBMi system, in a green-screen session, run the following command to direct the call to the PJS instance installed on your PC. Use the port number for that PJS instance; default is 8081 as used in this example.

...