Versions Compared

Key

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

...

Once you have completed your SET commands your next command would invariably be the WRITE command.

Syntax:

Command

Keyword

Value

Developer notes

SET

LIST

value

Conditional. Bind list name.

FRAGMENT

value

Conditional. Bind fragment name.

SUBSET


Optional. See SUBSET.

DIR

value

Conditional. Nominate a relative or absolute path to be set as the current directory.
The DIR keyword does not have any relationship with the other keywords for the SET command.

Example

    SET LIST(ORDERS) #WRKLST

SET FRAGMENT(DETAIL) SERVICE_EXCHANGE(*FIELD)


Note: List and Fragment keywords

There are two possible ways to add a list of data when creating an a JSON document.

  1. The most obvious way is to use the SET command described here with the LIST keyword, then specifying the array in a working list. With this approach, the section of JSON would need to be defined as a list in the JSON Binding Wizard.
  2. Alternatively, the same could be achieved by using the FRAGMENT keyword inside some looping code. Each loop would add a new row to the list. JSON documents and readers will automatically pick up this repeating sequence as a list. With this approach, the section of JSON would need to be defined as a fragment in the JSON Binding Wizard.

...