Versions Compared

Key

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

...

Lists use only a working list, so the GET LIST command requires a working list argument.

Syntax:

Command

Keyword

Value

Developer notes

GET

LIST

value

Conditional. Bind list name.

FRAGMENT

value

Conditional. Bind fragment name.

SUBSET


Optional. See SUBSET.

Example

    GET LIST(ORDERS) #WRKLST

GET FRAGMENT(DETAIL) SERVICE_EXCHANGE(*FIELD)

Note: List and Fragment keywords

You can only use one keyword at a time.

There are two ways in which you can read a list from an a JSON document.

  1. You can either define the relevant section of the JSON code as a list (using the JSON Binding Wizard), and use the LIST keyword in your GET command. This will retrieve the entire list in one go into a working list.
  2. Alternatively, you can define the relevant section as a collection of fragments (using the JSON Binding Wizard) and then use the FRAGMENT keyword in your GET command and place this in a loop.

...