Skip to main content
Omnitracs Knowledge Base

An Example Using ILE RPG

A complete, buildable ILE RPG example illustrating a SAX parser-based approach to extracting data from an ESS XML transaction may be downloaded from this page. Some additional notes about the example program: 

  • The module assumes you've already called Dequeue, extracted the transaction block, converted it from base64 to string, and passed it to this program. 
  • This program's function is strictly limited to extracting trailer equipment and position information from T.1.08 transaction types (Trailer Position Report)  and initializing a program data structure.
  • This program is specifically designed to be loosely coupled with the ESS transactions schema and is tolerant of (ignores) unexpected or new transactions types, elements and attributes. The program is intended for informational purposes but may be readily transformed into a more generic, multi-purpose ESS XML transaction processor.
  • We'll be using the IBM XML4PR v5.5 API (service program) and its SAX2 parser which is an optionally installable product available on the iSeries system. Newer versions of the API may be available.The ILE RPG module is fully documented and contains some building information.
  • The module was tested but of course bugs may still lurk - if you encounter any bugs please let us know.  

Download and review the code in IISAMPCODE.RPGLE and give it a try. 

  • Was this article helpful?