This section provides instructions on how to process an EDI Mapping Specification
file.
Processing sequence for processing an EDI Mapping Specification file:
-
Load the EDI Specification into Memory
-
Define output files (including headers) and set up staging buckets for each EDI
Target File
-
For each data element in the file:
-
Read the data element and parse its data from the file
-
For each output file:
- Check if the Data Element matches an EDI Section in any of the
current EDI Section's parent EDI Sections, a sibling EDI Section
to the current EDI Section, or a direct child EDI Section to the
current EDI Section:
- If new EDI Section has a direct descendant to the EDI
Section with Is Output Row and some data has been
previously stored for the EDI Section with Is Output Row:
- Output contents of staging bucket in file.
- Clear the fields mapped from the new EDI Section all
descendant EDI Sections
- Update the current EDI Section to the new EDI
Section
- For each defined field in the current EDI Section or Is
Inherited field from a parent EDI Section:
- If data element from the file matches qualified data
element for the EDI Field (including current EDI Section)
- Extract the data by Data Position and place in
staging bucket
- Next field.
-
Next file.
-
Next data element
-
For each output file:
-
If any staging bucket EDI Field in the Is Output Row EDI Section has
been defined output the contents of the staging bucket to the
file.
-
Close the output file
-
Next output file