XMLFileExtract
Use this form set level rule when the extract list loaded by the transaction contains the name of an external file source for the XML tree.
Note | The extract list and the XML tree are separate items. Even if you are only using an XML file as the source of the transaction, there will be two copies of the information in memory — one as the extract list and one as the XML tree. |
Syntax
For the parameter, you can use one of the following:
- FILE=<filename>
Where filename is the name of the XML file, including path information.
- INI=group,option
Where group and option are defined in the INI files
- SCH=offsetofmask,<searchmask> offsetofdata,lengthofdata
Parameter |
Description |
offsetofmask |
the offset of the search mask |
offsetofdata |
the offset where the path and the file name start |
lengthofdata |
the length of the file name |
- GVM=<globalvariablename>
Where globalvariablename is the name of a GVM that contains the file name.
Here are examples of how you can use this rule:
;XMLFileExtract;2;FILE=SAMPCO.XML;
;XMLFileExtract;2;INI=Group,Option;
;XMLFileExtract;2;SCH=11,FILENAME 20,20;
;XMLFileExtract;2;GVM=FileNameVar;
Keep in mind...
- Begin each XML transaction with the XML declaration.
- In the RunMode control group, set the XMLExtract option as shown here:
< RunMode >
XMLExtract = Yes
- You place the rule in different locations in the AFGJOB.JDT file, depending on the mode in which you are running. For multi-step mode, place the XMLFileExtract rule after the LoadExtractData rule, as shown here:
;LoadExtractData;;
;XMLFileExtract;2;FILE=SAMPCO.XML;
For single or two-step mode, place the XMLFileExtract rule after the NoGenTrnTransactionProc rule, as shown here:
;NoGenTrnTransactionProc;;
;XMLFileExtract;2;FILE=SAMPCO.XML;
- Remember that the system decides whether to search the extract list or the XML tree by checking to see if the search mask starts with an exclamation mark (!). The exclamation mark indicates that this is an XML path string. The system ignores the exclamation mark when it performs the XML path search.
To preserve the space when mapping data, use two exclamation marks (!!). Otherwise, the system assumes it should remove the leading white space.
- When running NoGenTrnTransactionProc (single or two-step mode) and the INI option is set to load the XML file, so there is no need to place XMLFileExtract rule in the AFGJOB.JDT file. Doing so makes the system load the XML file twice.
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.