SETFILE (XFILE)
9.0E
The SETFILE instruction sets information from a file variable. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
xfile
Required. A previously defined XFILE variable.
keyword
Required. One of the valid keywords defined below.
value
Required. A previously defined Character String Variable or Numeric Variable from which the value is obtained.
Flags Affected: ZERO, EOS, OVER
Note the following:
If the file specified is not open, the ZERO flag is cleared and the variables remain unchanged. If the file is open, the ZERO flag is set.
The following keywords may be used:
|
Keyword |
Sets ... |
|
FILENAME={svar} |
the name of the physical XML file. |
|
FILTERNOCASE={nvar} |
whether the filtered READ instructions for a XFILE are to be executed in a case-sensitive manner. By default a filtered READ for a XFILE is executed with case sensitivity. If the FILTERNOCASE keyword for a XFILE is set ON, the filtered READ for the XFILE is executed without case sensitivity. |
|
NOEMPTYFIELDS={nvar} |
a flag indicating that an error will occur on reading an empty field. |
|
ROOT={svar} |
the name of the root element. |
|
RECORDSET={svar} |
the name of the recordset. |
|
SCHEMANAME={svar} |
the name of the physical XML schema file. |
|
SCHEMACLOSED={nvar} |
a flag indicating not to allow additions to schema. |
|
SUBHEADER={svar} |
the current XFILE sub-header. When a sub-header is assigned to the XFILE, this sub-header is output to the XML data immediately following the XML declaration line that contains the version. The GETFILE SUBHEADER operation retrieves the current XFILE sub-header string that has been set by a SETFILE. (9.6D) |
|
SCHEMATYPE={svarslit} |
the schema type for a schema data label reference. |
|
SCHEMAWRITE={nvar} |
a flag indicating that the schema should be output on a FLUSH or CLOSE statement. |
|
XMLFORMAT={nvar} |
a value indicating the XML output formatting options. |
The data string for the SCHEMATYPE keyword is a delimited string that is defined the same as described for the GETFILE SCHEMATYPE keyword.
The SETFILE SCHEMATYPE data should only include the schema data label references that are to be changed.
When a SUBHEADER string is assigned to an XFILE, the user data string is output into the XML data stream exactly as specified by the 'SETFILE SUBHEADER={svar}' instruction. The PL/B program is responsible for providing a properly formatted XML sub-header data string.
See Also: GETFILE (XFILE), XML Support
![]() |