The SET command is used for two distinct operations. Use the DIR keyword to set the current working directory or alternatively use the LIST or FRAGMENT keywords to populate the outbound document object.
Once you have completed your SET commands your next command would invariably be the WRITE command.
Command | Keyword | Value | Developer notes |
|---|---|---|---|
SET | LIST | value | Conditional. Bind list name. |
FRAGMENT | value | Conditional. Bind fragment name. | |
INSTRUCTION | value | Optional. XML processing instruction. | |
DATA | value | Conditional. Processing instruction data. | |
SUBSET | Optional. See SUBSET. | ||
DIR | value | Conditional. This keyword is used to nominate a relative or absolute path to be set as the current directory. It does not have any relationship with the other keywords for the SET command. |
SET LIST(ORDERS) #WRKLST
SET FRAGMENT(DETAIL) SERVICE_EXCHANGE(*FIELD)
There are two possible ways to add a list of data when creating an XML document.
Whichever way you choose, you will need to carefully decide whether the relevant section of XML is defined as a List or a Fragment.
If you wanted to add an XML processing instruction as follows:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="mystyles.css"?>
then you could use the following command:
SET INSTRUCTION(xml-stylesheet) DATA(type="text/css" href="mystyles.css")