midrange.com code scratchpad |
Name:
XML-INTO processing
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
07/11/2008 03:29:21 pm
|
IP:
Logged
|
|
Description:
For some reason, on the transaction.datetime and transaction.quantity are filled when loadCurrentRow fires. See http://code.midrange.com/e94c59dafe.html for the XML file in question.
|
Code:
- D options...
- D S 100A
- D commAreaDef...
- D S 1A
- D transactionDefinition...
- D DS based(TEMPLATE_ONLY)
- D qualified
- D customerCode...
- D 6A
- D datetime...
- D 19A
- D docketNumber...
- D 15A
- D quantity...
- D 12P 4
- D productType...
- D 50A
- D unitNumber...
- D 20A
-
- D loadCurrentRow PR 10I 0
- D commArea LIKE(commAreaDef)
- D transaction LIKEDS(transactionDefinition)
- D DIM(1)
- D const
- D elementsInCount...
- D 10I 0 VALUE
-
- /free
- options = 'doc=file path=details/transaction allowextra=yes +
- allowmissing=yes';
- xml-into %handler(loadCurrentRow : commAreaDef)
- %xml('/tmp/fuel/fuelConsumption.xml' : options);
-
- /end-free
-
-
- P loadCurrentRow B
- D loadCurrentRow PI 10I 0
- D commArea LIKE(commAreaDef)
- D transaction LIKEDS(transactionDefinition)
- D DIM(1)
- D const
- D elementsInCount...
- D 10I 0 VALUE
-
- P loadCurrentRow E
|
|
|