PIXES - Processing Instructions XML, EDI & SQL.
This document is a work-in-progress.
As of October 10, 2007
©American Coders, Ltd. 2005-07
Publish or Perish
Requires OBOE Version 3.5
Programming EDI and SQL using XML tags.
This is not an XSLT processor or a replacement for it, though PIXES may be considered an alternative to XSLT.
The files used by PIXES parser will not work with a XSLT processor and vice versa.
PIXES does not support the concept of XML namespace.
PIXES is designed to work with the hierarchy of X12 EDI message files and used in
conjunction with SQL databases.
As with XSLT, PIXES executes the code within the scope of a XML tag.
If the tag is not reachable then
tags within the unreachable scope are not executed.
For example during incoming processing - if the PIXES process has a segment tag such indicating logic for a N1 segment
<segment id="N1">...</segment>
and the process is within a segment container without a N1 segment then all of the PIXES processing
tags between <segment and </segment are ignored.
Another example - if the PIXES process has a SQL select tag pulling data from a table
<select fields="*" table="product" where="prodid="12345678">...</select>
and the SQL processor returns some rows for the result set for the
select statement then all of the data within the select tags are processed.
Some tags don't required inner tags, for instance
<exit/>
and <dumpVariables/>
Modes
A PIXES process runs in one of two modes:
- inbound.Click here to review a discussion of inbound processing
- outbound.Click here to review a discussion of outbound processing
Tag Types
The package provides for several types of tags
- SQL tags.
- EDI tags.
- Control processing tags.
- Simple math.
- Field level setting and getting.
External Requirements
- Java
- log4j from Apache
- OBOE - Open Business Objects for EDI - Version 3.5
- SQL and JDBC libraries
Tested against
- MySQL Version 4.0
- DB2 Personal Version 8.1
- Open AS2 - optional
Files Used
- PIXES Processing File
- Inbound Message File
- Outbound Mesage File
- System.out File
Variables
Variables may be assigned by several methods.
- By assigning a value using the set tag
- By retrieving a SQL field using the select tag
- By retrieving a EDI field value using the element tag
- Computing a value using the compute tag
- Passing a value using a runtime parameter call
- Storing a name/value pair collection in a properties file
The package provides for an indexing mechanism using the [] (square brackets) to indicate an indexed name. Unlike
formal programming languages predefining the size or number of index items is not possible. This is similar to the
concept of Indexed Strings used in the NetRexx and
Rexx languages.
Tags or Processing Instructions
- atEnd
- break
- commit
- composite
- compute
- connect
- continue
- delete
- dumpVariables
- element
- envelope
- exit
- for
- functionalgroup
- if
- insert
- leave
- log
- loop
- process
- rollback
- segment
- select
- set
- subroutine
- table
- transactionset
- update