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: 

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: 

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

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

 

1001

Document/message name, coded

C an..3

*

220 = Regular Order

1131

Code list qualifier

C an..3

 

3055

Code list responsible agency, coded

C an..3

 

 

1000

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

 

2005

Date/time/period qualifier

M an..3

*

137 = Document/message date/time

2380

Date/time/period

C an..35

System Generated Date

2379

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

 

3039

Party id. identification

M an..35

 

1131

Code list qualifier

C an..3

 

3055

Code list responsible agency, coded

C an..3

 

 

C058

NAME AND ADDRESS

C

 

3124

Name and address line

M an..35

 

3124

Name and address line

C an..35

 

3124

Name and address line

C an..35

 

3124

Name and address line

C an..35

 

3124

Name and address line

C an..35

 

C080

PARTY NAME

C

 

3036

Party name

M an..35

 

Buyer Name

3036

Party name

C an..35

   

3036

Party name

C an..35

   

3036

Party name

C an..35

   

3036

Party name

C an..35

   

3045

Party name format, coded

C an..3

   

C059

STREET

C

   

3042

Street and number/p.o. box

M an..35

 

Buyer Address Line 1

3042

Street and number/p.o. box

C an..35

  Buyer Address Line 2

3042

Street and number/p.o. box

C an..35

 

3042

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.