EDIdEv - Electronic Data Interchange Development

UN/EDIFACT EDI Sample Programs

Framework EDI (FREDI) is also a parser for UN/EDIFACT EDI files. Its component, along with its easy to use utilities, makes FREDI an effective EDI tool for developers for creating solutions that can generate, translate and validate EDIFACT messages.  Below are example programs to demonstrate how one can easily use the Framework EDI component in a programming language to generate, translate and acknowledge EDI files of UN/EDIFACT, and other industry standards based on it such as EANCOM and SMDG.  (You must have EDIdEv Framework EDI installed on your machine to run the programs successfully. )


Run example programs 

  • EDI Generator - Creates an outbound UN/EDIFACT EDI Message.
  • EDI Translator - Parses and translates an inbound UN/EDIFACT ORDERS D01B EDI file.
  • EDI Acknowledgment - Generates a CONTRL file after validating an UN/EDIFACT EDI file.

 

Download example programs

Excel - EDI instructions for Excel example programs

  • Excel_Validator  64-bit - Excel program that validates UN/EDIFACT EDI files.
  • ExcelINFENT_Inbound  64-bit - Translates a UN/EDIFACT INFENT EDI file into an Exel spreadsheet.
  • ExcelEdiEdifact  64-bit - Generates and translates a UN/EDIFACT ORDERS (Purchase order message) EDI file from/to an Excel workbook.
  • ExcelEdiBAPLIE  64-bit - Generates and translates a UN/EDIFACT BAPLIE D13B EDI file from/to an Excel workbook.  (Download SMDG guidelines at SMDG.org)
  • ExcelEdiCOARRI  64-bit - Generates and translates a UN/EDIFACT COARRI D00B EDI file from/to an Excel workbook.  (Download SMDG guidelines at SMDG.org)
  • ExcelEdi_CODECO_SMDG  64-bit - Generates and translates a UN/EDIFACT CODECO SMDG EDI file from/to an Excel workbook.  (Download SMDG guidelines at SMDG.org)  view tran code  view gen code
  • ExcelEdICOREOR  64-bit - Generates a UN/EDIFACT COREOR SMDG EDI file from an Excel workbook.  (Download SMDG guidelines at SMDG.org)
  • Excel CUSCAR  64-bit - Generates a UN/EDIFACT CUSCAR EDI file from an Excel workbook.  (Download U.S. Customs and Border Protection (CBP) guideline at cbp.gov)
  • Excel CUSREP  64-bit - Generates a UN/EDIFACT CUSREP EDI file from an Excel workbook.  (Download U.S. Customs and Border Protection (CBP) guideline at cbp.gov)
  • ExcelTranGen_DELFOR  64-bit - Generates and translates a UN/EDIFACT DELFOR D01B EANCOM (Delivery schedule response message) EDI file in Excel workbook.   (Download EANCOM guidelines at GS1.org)
  • ExcelTranGen_DESADV  64-bit - Generates and translates a UN/EDIFACT DESADV D99B (Despatch advice message) EDI file in Excel workbook.
  • ExcelEdi_IFTMIN  64-bit - Generates and translates a UN/EDIFACT IFTMIN (Instruction message) EDI file from/to an Excel workbook.  view tran code  view gen code
  • ExcelEdi_IFTSTA  64-bit - Generates and translates a UN/EDIFACT IFTSTA (International multimodal status report message) EDI file from/to an Excel workbook.
  • ExcelEdi_IFTSAI  64-bit - Generates and translates a UN/EDIFACT IFTSAI (Forwarding and transport schedule and availability information message) EDI file from/to an Excel workbook.
  • Excel_INVOIC_EANCOM  64-bit - Generates and translates a UN/EDIFACT INVOIC EANCOM EDI file from/to an Excel workbook.  (Download EANCOM guidelines at GS1.org)
  • Excel_IFCSUM_EANCOM  64-bit - Generates and translates a UN/EDIFACT IFCSUM EANCOM EDI file from/to an Excel workbook.  (Download EANCOM guidelines at GS1.org)
  • Excel_ORDRSP_EANCOM  64-bit - Generates and translates a UN/EDIFACT ORDRSP EANCOM EDI file from/to an Excel workbook.  (Download EANCOM guidelines at GS1.org)
  • ExcelEdiVERMAS  64-bit - Generates and translates a UN/EDIFACT VERMAS D16A EDI file from/to an Excel workbook.  (Download SMDG guidelines at SMDG.org)


Evaluating the FREDI component with Excel example programs

 

Access - EDI instructions for Access example programs

  • Access_ORDERS.zip - Generates and translates a UN/EDIFACT EDI message from/to an Access database
  • Access_GOVCBR - Generates and Translates a GOVCBR D13A EDI file (see CBSA ASFC guideline for reference)

 

Visual Basic .NET    (See how to convert a .NET 32-bit example program to a 64-bit in VS2013)

  • vbNet_ORDERS_SqlClient  32-bit | 64-bit
    Generates/Translates an EANCOM D01B ORDERS EDI file from/to a SQL database view tran code view gen code  (Download EANCOM guidelines at GS1.org)
  • vbNet_BAPLIE  32-bit | 64-bit
    Generates/Translates a UN/EDIFACT D04B BAPLIE (Bayplan/stowage plan occupied and empty locations message) EDI file
  • vbNet_IFTMCS  32-bit | 64-bit
    Generates/Translates a UN/EDIFACT D99B IFTMCS (Instruction contract status message) EDI file
  • vbNet_IFTSAI  32-bit | 64-bit
    Generates/Translates a UN/EDIFACT D99B IFTSAI (Forwarding and transport schedule and availability information message) EDI file
  • vbNet_DESADV  32-bit | 64-bit
    Generates/Translates a UN/EDIFACT D96A DESADV (Despatch advice message) EDI file view code 
  • vbNet_Ack_CONTRL  32-bit | 64-bit
    Program that acknowledges a UN/EDIFACT INVOIC file with a CONTRL EDI file.

 

Visual Basic 6

  • vb6Tran_BAPLIE - Translates UN/EDIFACT BAPLIE D13B message in Visual Basic 6
  • vb6Gen_BAPLIE - Generates UN/EDIFACT BAPLIE D13B message in Visual Basic 6
  • vb6Tran_DESADV - Translates UN/EDIFACT DESADV D96A message in Visual Basic 6
  • vb6Gen_DESADV - Generates UN/EDIFACT DESADV D96A message in Visual Basic 6
  • frediGen_INVOIC - Generates UN/EDIFACT INVOIC message in Visual Basic 6 view code
  • frediGenMulti_INVOIC - An example program that shows how to create a UN/EDIFACT INVOIC file with multiple interchanges and messages using the Framework EDI component in VB6
  • frediTran_INVOIC - Translates UN/EDIFACT Invoice Message (INVOIC) view code
  • Tran_ORDERS_DB - An VB6 example program that shows how to translate a UN/EDIFACT ORDERS file with multiple messages into an Access database
  • vb6_CONTRL_Ack - Creates a CONTRL EDI file after acknowledging a UN/EDIFACT message view code

 

C# .NET    (See how to convert a .NET 32-bit example program to a 64-bit in VS2013)

  • cSharp_BAPLIE  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT BAPLIE (Bayplan/Stowage Plan Occupied and Empty Locations Message) EDI file.  view tran code view gen code
  • cSharp_COARRI  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT COARRI D95B (Container Discharge/Loading Report Message) EDI file.  (Download SMDG guidelines at SMDG.org)
  • cSharp_CODECO  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT CODECO D95B (Container Gate-In/Gate-Out Report Message) file.
  • cSharp_CUSCAR  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT CUSCAR D95B (Customs Cargo Report Message) EDI file.
  • cSharp_CUSDEC  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT CUSDEC D96B (Customs Declaration Message) EDI file.
  • cSharp_CUSRES  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT CUSRES D96B (Customs Response Message) EDI file.
  • cSharp_DESADV_EANCOM  32-bit | 64-bit
    Translates/Generates an EANCOM DESADV D01B (Despatch advice message) EDI file.  (Download EANCOM guidelines at GS1.org)
  • cSharp_DESTIM  32-bit | 64-bit
    Translates/Generates DESTIM D96B (Equipment damage and repair estimate message) EDI file. view tran code view gen code
  • cSharpTranGen_INVOIC_SqlClient  32-bit | 64-bit
    Translates/generates an EANCOM INVOIC D01B Message into/from a SQL database.  view tran code view gen code
  • cSharpGen_INVOIC_OleDb  32-bit | 64-bit
    Generates an INVOIC D97A EDI file with data from an Access database using OleDb. (VS2010 32-bit)
  • cSharpTran_INVOIC_OleDb  32-bit | 64-bit
    Translates an INVOIC D97A EDI file into an MS Access database using OleDb. (VS2010 32-bit)
  • CSharp_PAXLST  32-bit | 64-bit
    Translates/Generates a UN/EDIFACT PAXLST D05 (U.S. Customs and Border Protection) EDI file.  (Download CPB.GOV guideline at cpb.gov (un_edifact_guide_2.pdf))
  • cSharpAck_CONTRL  32-bit | 64-bit
    Program that acknowledges a UN/EDIFACT INVOIC file, and then creates a CONTRL acknowledgment file in C# using Framework EDI component. view code


Generating a UN/EDIFACT EDI file

 


Acknowledging a UN/EDIFACT EDI file

 


Validating EDI files in Excel

 


Please note that the example programs have an evaluation SEF file included. What is SEF?

 

Important:  Some of the above sample EDIFACT files may have a single quote followed by a carriage return line feed characters as their data segment terminator.  To view them with the eFileManager, the 'Data Segment Terminator' field in the 'eFileManager Properties' dialog box must be entered with the following characters: '{13:10} (A single quote, followed by the ASCII numbers for the carriage return and line feed, enclosed in squiggly brackets and separated by a colon.)

 

    Click here to evaluate the Framework EDI     

 

The example programs provided in this article are for illustration only and have no purpose other than to show software developers how to use the Framework EDI component in programming languages to process EDI files.  If you have any questions, don't hesitate to contact us:

Email: support@edidev.com
Email: sales@edidev.com