ECS/EDI Processor - Outbound Application Integration
The ECS/EDI Processor can be integrated to any AS/400 Business Application with the use of EDI Mapping programs. The creation of EDI Messages containing data derived from AS/400 Business Applications requires the development of Generators, to map the data from the business application database to the ECS/EDI Transaction and control files (IEXC & IEYT).
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 extracting data from.
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 will perform the following processing for Outbound transactions once the application data has been mapped to the Transaction file:
Read through the ECS/EDI Control file selecting transactions ready for Generating EDI Messages.
Retrieve the related EDI Trading Partner Event definition.
Retrieve the related EDI Syntax Set definition.
Create the EDI Message(s) based on the records mapped to the EDI Transaction file.
Translate data values according to the predefined Element Translations configured for the EDI Trading Partner Event.
Perform any character replacements defined for the Syntax Set.
Validate the EDI Message(s) against the EDI Standard and Syntax Set. Proactive Email Error Reporting to the Event Administrator.
Insert the EDI Message Envelope Segments
Pack the validated Message(s) into an Interchange and insert the optional Functional Group Envelope Segments and mandatory Interchange Envelope Segments.
Move the Outbound EDI Interchange to the Output Folder defined within the EDI Trading Partner Event ready for transmission to the Trading Partner.
The ECS/EDI Processor expects the Transaction and Control records to have been created by an external user developed Generation program. The Generation program is closely linked to the Business Application and should be designed/developed according to the Business Application & EDI Message Agreement requirements.
The Generator
The EDI Generation program is an Outbound mapping program that is responsible for extracting the required details from the Business Application to create the ECS/EDI Transaction and Control records. A Generator is executed once for every EDI Message (transaction) required. The Generator is called by the Selector.
The Generator should be designed and developed to perform the following
Use Unique Business Application Transaction reference, passed to the Generator by the Selector, to retrieve required data from the Business Application, such as an Order number or Invoice number.
Map the required data contents from the Business Application database to the ECS/EDI Transaction detail file (IEYT).
Write an ECS/EDI Control record to indicate the data has been mapped.
Update the Business Application system to indicate that the data has been mapped.
The Selector
The Selector is responsible for reading through the Business Application Header file, selecting unprocessed records for which Outbound EDI Messages should be created for.
A Selector is normally linked to a business transaction (such as Purchase Orders). A Selector is responsible for executing the relevant Generation Programs passing to it the Unique Transaction Id as a Parameter.
A Selector can be designed to execute multiple Generators, if for example, multiple EDI Message formats must be supported for the same business transaction.
The Generation program must be designed to write one record to the ECS/EDI Transaction file for each data element that is required to be populated on the Outbound EDI Message. The Element Id and Segment Tag Id must also be written to the Transaction record to define the structure of the EDI Message.
The following defines the mapping requirements for Outbound EDI Messages
File: IEYT, ECS/EDI Transaction detail file - Map one record for every data element value.
Field | Description | Required | Comments |
YTGUI | Global Unique Id | M | Unique Transaction Id which links IEYT & IEXC |
YTSEQ | Sequence Number | M | Sequential Sequence number |
YTVAL | Element data Value | M | Element Data Value |
YTSEG | EDI Segment Tag Id | M | Map EDI Segment Id Tag |
YTELE | EDI Element Id | M | Map EDI Element Id |
YTLMU | Last Maintained User | M | Generation Program Name |
YTLMD | Last Maintained Date | M | Mapped Date (YYYYMMDD) |
YTLMT | Last Maintained Time | M | Mapped Time (HHMMSS) |
Required: M=Mandatory, O=Optional
File: IEXC, ECS/EDI Control file - Map one record for every EDI Message required.
Field | Description | Required | Comments |
XCGUI | Global Unique Id | M | Unique Transaction Id which links IEYT & IEXC, this can be the Transaction reference number or a calculated value. |
XCDIR | Direction (I/O) | M | O=Outbound |
XCEVT | Event Id | M | Relevant EDI Trading Partner Event Id as held in IEXE.XEEVT |
XCSTS | Status | M | "RDY" |
XCTP | Trading Partner | O | Optional, will be automatically extracted from EDI Event if not specified |
XCTRAN | Transport Method | O | Optional, will be automatically extracted from EDI Event if not specified |
XCSID | Sender Id | O | Optional, will be automatically extracted from EDI Event if not specified |
XCRID | Receiver Id | O | Optional, will be automatically extracted from EDI Event if not specified |
XCTRIP | Trigger Pgm Override | O | Optional, will be automatically extracted from EDI Event if not specified |
XCTRIL | Trigger Lib Override | O | Optional, will be automatically extracted from EDI Event if not specified |
XCETRP | Error Pgm Override | O | Optional, will be automatically extracted from EDI Event if not specified |
XCETRL | Error Lib Override | O | Optional, will be automatically extracted from EDI Event if not specified |
XCIPTH | EDI Input Path | O | Not Required for Outbound Transactions |
XCOPTH | EDI Output Path | O | Optional, will be automatically extracted from EDI Event if not specified |
XCXFIL | EDI File name | O | Not Required, contains name of Output EDI File. |
XCOFIL | EDI Output File Name Override | O | Optional file name override. Automatic file name will be generated if a value is not specified. |
XCOGUI | Original GUID (XCGUI) | O | This will contain the value from XCGUI once when processed by ECS/EDI . |
XCAREF | Application Reference | O | Map Transaction Reference (ie Order/Invoice No) |
XCERR | Error Description | O | Not Required. |
XCLMU | Last Maintained User | M | Generation Program Name |
XCLMD | Last Maintained Date | M | Current Date (YYYYMMDD) |
XCLMT | Last Maintained Time | M | Current Time (HHMMSS) |
Required: M=Mandatory, O=Optional
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+++ECS
House:PO Box
534+Horsham++RH13
9WJ'
The EDI Trading Partner Agreement is required during the design & analysis phase to map the data to the EDI Elements, 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 Line 1 |
|||
|
Street and number/p.o. box |
C an..35 |
Buyer Address Line 2 | |||
|
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. An example of the ECS/EDI Transaction and Control records required to create the Segments displayed would look like:
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 | E501 |
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 | E501 |
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 | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 4 DTM+137:20021025: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 | E501 |
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 | E501 |
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 | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 7 NAD+BY+ECS Limited+++ECS House: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 | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 8 NAD+BY+ECS Limited+++ECS House: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 | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 9 NAD+BY+ECS Limited+++ECS House:PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 009 |
YTVAL | Element data Value | ECS House |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3042 |
YTLMU | Last Maintained User | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 9 NAD+BY+ECS Limited+++ECS House:PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 010 |
YTVAL | Element data Value | PO Box 534 |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3042 |
YTLMU | Last Maintained User | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 10 NAD+BY+ECS Limited+++ECS House:PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 011 |
YTVAL | Element data Value | Horsham |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3164 |
YTLMU | Last Maintained User | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEYT, ECS/EDI Transaction detail file - Record 11 NAD+BY+ECS Limited+++ECS House:PO Box 534+Horsham++RH13 9WJ'
Field | Description | Value |
YTGUI | Global Unique Id | 20001231125959001 |
YTSEQ | Sequence Number | 012 |
YTVAL | Element data Value | RH13 9WJ |
YTSEG | EDI Segment Tag Id | NAD |
YTELE | EDI Element Id | 3251 |
YTLMU | Last Maintained User | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
File: IEXC, ECS/EDI Control file - Map one record for every EDI Message required.
Field | Description | Value |
XCGUI | Global Unique Id | 20001231125959001 |
XCDIR | Direction (I/O) | O=Outbound |
XCEVT | Event Id | BBB_ORD_OUT |
XCSTS | Status | "RDY" |
XCAREF | Application Reference | "Purchase Order Number 121704" |
YTLMU | Last Maintained User | E501 |
YTLMD | Last Maintained Date | 20001231 |
YTLMT | Last Maintained Time | 125959 |
Note: If you want to know how you should be populating the EDI Transaction file (IEYT) and you have a sample copy of the EDI Interchange you are need to generate then it is possible to configure an Inbound EDI Trading Partner Event, process the Inbound Interchange using the EDI Processor. The EDI Transaction record definitions (IEYT) are identical for Inbound and Outbound transactions, so the resulting contents of the EDI Transaction file (IEYT) will be identical to what your EDI Generator should be creating.
Support for Elements with Blank Values
The ECS/EDI Processor
will ignore records with a blank Value (IEYT.YTVAL=*BLANK). If you have a requirement to write an
EDI Element
with a Blank value then the special value &BLANK can be used in IEYT.YTVAL. The
&BLANK will be automatically replaced with a blank space by the EDI Processor.
ECS/EDI Processor Sample Application
ECS/integrated email is supplied with a sample EDI integration environment with programs and documented source code demonstrating how Generation 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.