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.

FRAGMENT

value

Conditional. Bind fragment.

INSTRUCTION

value

Optional. XML processing instruction.

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.

...

  • When you issue a GET FRAGMENT, that fragment becomes the current fragment. That is, the fragment pointer moves to the current one.

  • You need to read the fragments in an order that allows all fragments to be accessed. You can only access lists and child fragments once you have positioned the fragment pointer to its parent fragment. So, in a way, fragments are a bit like branches on a tree - to access lists and fragments further down the tree you will need to position the fragment pointer to the parent branch.

  • For example, when you issue a GET FRAGMENT, a GET LIST can only access lists within this current fragment. Therefore, you should read all the lists (using GET LIST) in the current fragment before you move on to another. Once you move onto another fragment, then the lists in the previous fragments will not be accessible. You may access the lists within a specific fragment in any order.

  • When a fragment becomes the current fragment, it is marked as used, so once you leave it, it will not become the current fragment again.

Note: Instruction keyword

If the XML processing instructions were as per the following example:

...