ECS/EDI Processor - Inbound Application Integration
The ECS/EDI Processor can be integrated to any AS/400 Business Application with the use of EDI Mapping programs. Integration of data derived from Inbound EDI Messages requires the development of Converters and Selectors.
The development of EDI Mapping programs is a technical task. Before commencing development please ensure that you have the necessary AS/400 authority to create the required objects and that you are technically able. Developing EDI Mapping definitions requires a good understanding of the AS/400, DB/400, PDM, RPG, Query, some knowledge of EDI and the Business Application you are updating.
For an Overview of the ECS/EDI Processor, click here
Business Application EDI Integration
The point of application integration with the ECS/EDI Processor is with two DB/400 physical files:
IEXC - ECS/EDI Transaction Control
IEYT - ECS/EDI Transaction Detail file
User defined mapping programs, shown in the following diagram in yellow, are required to integrate the ECS/EDI Processor Transaction and Control Files with your Business Application System:
The ECS/EDI Processor is responsible for performing the following actions for Inbound transactions:
Search the defined Input Folder for new EDI Interchanges.
Read the Interchange Header Envelope Segment and locate the related Trading Partner Event.
Unpack the EDI Interchange into individual EDI Message files.
Validate the EDI Message(s) against the EDI Standard and Syntax Set, report any errors to the Event Administrator.
Remove Release Characters.
Translate data values according to the predefined Element Translations configured for the EDI Trading Partner Event.
Convert the EDI Message to AS/400 Database format.
The ECS/EDI Processor responsibility ends once the EDI element values has been written to the DB/400 Transaction file (IEYT) and the control file updated (IEXC). The Application relevant mapping program developed to select Inbound Transactions with a status of "RDY", meaning that the transaction is ready for mapping. Once mapped the status should be changed to "FIN" to indicate the data has been mapped successfully.
The ECS/EDI Transaction File will contain a record for every data element populated within the Inbound EDI Message. The EDI Transaction record contains the following key values:
Element Id. (IEYT.YTELE)
Segment Id Tag. (IEYT.YTSEG)
Element Value (IEYT.YTVAL)
The Element Value contains the actual data, whereas the Segment Id Tag and the Element Id describe the data content.
The following Example represents a section of a sample EDIFACT, ORDERS message, Version D96A:
BGM+220+121704+9'
DTM+137:20001231:102'
NAD+BY+ECS
Limited+++PO Box
534+Horsham++RH13
9WJ'
The EDI Trading Partner Agreement is required during the design & analysis phase to help establish the Element Id' selection criteria required for mapping to the Business Application system. The following is a sample extract of a message agreement for the three segments listed above, the data elements in use are highlighted in Blue:
BGM - M 1 - |
Beginning of message |
|||||
Function : |
To indicate the type and function of a message and to transmit the identifying number. |
|||||
Segment number : 2 |
||||||
EDIFACT |
* |
Description |
||||
C002 |
DOCUMENT/MESSAGE NAME |
C |
||||
|
Document/message name, coded |
C an..3 |
* |
220 = Regular Order |
||
|
Code list qualifier |
C an..3 |
||||
|
Code list responsible agency, coded |
C an..3 |
|
|||
|
Document/message name |
C an..35 |
||||
1004 |
Document/message number |
C an..35 |
Order Number assigned by document sender. |
|||
1225 |
Message function, coded |
C an..3 |
* |
9 = Original |
||
4343 |
Response type, coded |
C an..3 |
* |
AC = Acknowledge - with detail and change |
||
Segment Notes. This segment is used to indicate the type and function of a message and to transmit the identifying number. Example : BGM+220+128576+9' |
DTM - M 35 - |
Date/time/period |
|||||
Function : |
To specify date, and/or time, or period. |
|||||
Segment number : 3 |
||||||
EDIFACT |
* |
Description |
||||
C507 |
DATE/TIME/PERIOD |
M |
||||
|
Date/time/period qualifier |
M an..3 |
* |
137 = Document/message date/time | ||
|
Date/time/period |
C an..35 |
System Generated Date |
|||
|
Date/time/period format qualifier |
C an..3 |
102 = CCYYMMDD |
|||
Segment Notes. This segment is used to specify the date of the Order and, where required, requested dates concerning the delivery of the goods. Example : DTM+137:19970830:102' This example dates the message as the 30th of August 1997.
|
SG2 - C 99 - |
NAD-SG3-SG5 |
|||||
NAD - M 1 - |
Name and address |
|||||
Function : |
To specify the name/address and their related function, either by CO82 only and/or structured by CO80 thru 3207. |
|||||
Segment number : 9 |
||||||
EDIFACT |
* |
Description |
||||
3035 |
Party qualifier |
M an..3 |
* |
BY = Buyer |
||
C082 |
PARTY IDENTIFICATION DETAILS |
C |
||||
|
Party id. identification |
M an..35 |
|
|||
|
Code list qualifier |
C an..3 |
||||
|
Code list responsible agency, coded |
C an..3 |
|
|
||
C058 |
NAME AND ADDRESS |
C |
||||
|
Name and address line |
M an..35 |
||||
|
Name and address line |
C an..35 |
||||
|
Name and address line |
C an..35 |
||||
|
Name and address line |
C an..35 |
||||
|
Name and address line |
C an..35 |
||||
C080 |
PARTY NAME |
C |
||||
|
Party name |
M an..35 |
Buyer Name |
|||
|
Party name |
C an..35 |
||||
|
Party name |
C an..35 |
||||
|
Party name |
C an..35 |
||||
|
Party name |
C an..35 |
||||
|
Party name format, coded |
C an..3 |
||||
C059 |
STREET |
C |
||||
|
Street and number/p.o. box |
M an..35 |
Buyer Address |
|||
|
Street and number/p.o. box |
C an..35 |
||||
|
Street and number/p.o. box |
C an..35 |
||||
|
Street and number/p.o. box |
C an..35 |
||||
3164 |
City name |
C an..35 |
||||
3229 |
Country sub-entity identification |
C an..9 |
||||
3251 |
Postcode identification |
C an..9 |
||||
3207 |
Country, coded |
C an..3 |
* |
ISO 3166 two alpha code |
||
Segment Notes. This segment is used to identify the trading partners involved in the Order process. Identification of the buyer , supplier of goods and the delivery location.
|
The example EDI Message section represents 3 Segments with a total 11 elements containing data. The ECS/EDI Processor writes a Transaction detail record for every element containing data, so the result would be 11 Transaction detail records (IEYT).
An example of the ECS/EDI Transaction and Control records that would be created by the ECS/EDI Processor would look like the following:
File: IEYT, ECS/EDI Transaction detail file - Record 1 BGM+220+121704+9'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 001 |
YTVAL | Element data Value | 220 |
YTSEG | EDI Segment Tag Id | BGM |
YTELE | EDI Element Id | 1001 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 2 BGM+220+121704+9'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 002 |
YTVAL | Element data Value | 121704 |
YTSEG | EDI Segment Tag Id | BGM |
YTELE | EDI Element Id | 1004 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 3 BGM+220+121704+9'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 003 |
YTVAL | Element data Value | 9 |
YTSEG | EDI Segment Tag Id | BGM |
YTELE | EDI Element Id | 1225 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 4 DTM+137:20031025:102'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 004 |
YTVAL | Element data Value | 137 |
YTSEG | EDI Segment Tag Id | DTM |
YTELE | EDI Element Id | 2005 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 5 DTM+137:20001231:102'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 005 |
YTVAL | Element data Value | 20001231 |
YTSEG | EDI Segment Tag Id | DTM |
YTELE | EDI Element Id | 2380 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 6 DTM+137:20021025:102'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 006 |
YTVAL | Element data Value | 102 |
YTSEG | EDI Segment Tag Id | DTM |
YTELE | EDI Element Id | 2379 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 7 NAD+BY+ECS Limited+++PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 007 |
YTVAL | Element data Value | BY |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3035 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 8 NAD+BY+ECS Limited+++PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 008 |
YTVAL | Element data Value | ECS Limited |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3039 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 9 NAD+BY+ECS Limited+++PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 009 |
YTVAL | Element data Value | PO Box 534 |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3042 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 10 NAD+BY+ECS Limited+++PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 010 |
YTVAL | Element data Value | Horsham |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3164 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 11 NAD+BY+ECS Limited+++PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 011 |
YTVAL | Element data Value | RH13 9WJ |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3251 |
YTLMU | Last Maintained User | ECSEDI.EXE |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
The ECS/EDI Control File contains a record each EDI Message processed. The following record layout provides an example of the information available on the ECS/EDI Control File (IEXC) when receiving a sample EDI Message:
Field | Description | Field Value (sample data) |
XCGUI | Global Unique Id | 20001231125959001 |
XCDIR | Direction (I/O) | I |
XCEVT | Event Id | AAA_ORD_IN |
XCSTS | Status | RDY |
XCTRAN | Transport Method | *BLANK |
XCSID | Sender Id | AAA |
XCRID | Receiver Id | ECS |
XCTRIP | Trigger Pgm Override | *BLANK |
XCTRIL | Trigger Pgm Override Lib | *BLANK |
XCETRP | Error Trigger Pgm Override | *BLANK |
XCETRL | Error Trigger Pgm Override Lib | *BLANK |
XCIPTH | Input Path | C:\EDI\IN\INT001.INT |
XCOPTH | Output Path | C:\EDI\OUT\I000001.EDI |
XCXFIL | Output File name Override | *BLANK |
XCOFIL | Output File Name Override | *BLANK |
XCOGUI | Original GUID (XCGUI) | *BLANK |
XCAREF | Application Reference | *BLANK |
XCLMU | Last Maintained User | ECSEDI.EXE |
XCLMD | Last Maintained Date | 20001231 |
XCLMT | Last Maintained Time | 235959 |
The Converter
The Conversion program is an Inbound mapping program that is responsible for processing the transaction records for a single EDI Message (transaction) on each program execution. The conversion program should be developed to perform the following basic functions;
Read through the ECS/EDI Transaction records (File: IEYT)
Select the required data values and populate the appropriate Business Application database.
Update the status on the ECS/EDI Control file to indicate the data has been mapped. (Update IEXC.XCSTS from "RDY" to "FIN")
The Selector
There are two approaches to controlling the execution of Inbound conversion program:
Select the required data using a Selector program.
Configure the Conversion program as a Trigger Program within the EDI Trading Partner Event.
The decision as to which option is best depends on the Business Application environment. If ECS/integrated email is to control the execution of the conversion programs then allowances need to made to ensure that the library list is set accordingly and the User Id configured within ECS/ie has authority to the application.
The design of the Conversion program should remain the same, whether a Selection program is used or not. A conversion program is responsible for processing the transaction records for a single transaction (EDI Message).
ECS/EDI Processor Sample Application
ECS/integrated email is supplied with a sample EDI integration environment with programs and documented source code demonstrating how Conversion and Selection programs are built, these can be used as templates and adapted to suit your EDI and Business Application requirements .
Click here for more information on using the EDI Sample Application and Mapping Programs.
<<<<< Back to ECS/EDI Menu <<<<<
Copyright © 1998-2003 Electronic Commerce Solutions All rights reserved.
ECS/integrated email & ECS/ie are trademarks of Electronic Commerce Solutions, Ltd. Other brand names and product names used in this document are the trademarks and trade names of their respective holders and may be registered.