Versions Compared

Key

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

...

Use plugin "Call IBM i Program" to call the IBM i program. For the parameter definition, if the "data type" is "data stucture", the "elements" question is displayed. Click button "Define subfields..." to display a dialog where you can define the data structure subfields, as defined in the RPG code. For the "argument value" question, specify the work variable custData.

Image RemovedImage Added


When the IBM i program is called, data in the JSON object custData is passed to the RPG data structure parameter custData.

...

2) Capture the output into a work variable (e.g. custDataWorkVar, in case you want to use that data for something else besides setting the API output), then use plugin "Set API output" to use that work variable to set the API output property output["data"].

Image RemovedImage Added

  • For Profound.js releases earlier than 5.8.2, you only have the 2nd option above. That is, you need to capture the output into a work variable first (e.g. custDataWorkVar) , then use that work variable to set the API output property output["data"].

...

  • The subfield names as defined in low-code dialog "Define Data Structure Fields" do not have to match the field names as defined in the RPG program.
  • However, the attributes (data type, length, etc) must match.
  • Nested data structures are supported. You can define a subfield as data type "data structure", then right click on the subfield and take option "Add child subfield" to define the subfields for that data structure subfield. Below is an example where the subfield "addr" is a data structure made up of four child subfields.
  • Image RemovedImage Added
  • If you have the RPG code for the parameter interface, you do not have to manually define the parameters. You can click button "Extract parameters from RPG code snippet", paste the RPG code, and click button "Generate Parameters". The definitions for all parameters (including data structure parameters) are populated for you in the low-code plugin panel. For a data structure parameter, after it's extracted from the RPG code, you can click button "Define subfields..." to verify that the subfield definitions are correct as extracted.
  • Image RemovedImage RemovedImage AddedImage Added