CONTENTS Title Page Copyright Page Preface 1 Introduction to DEC/EDI Programming 1.1 Types of Application 1.2 Types of Document 1.3 Sending Documents 1.4 Receiving Documents 1.5 The Application Interface Routines 1.6 Internal and External Files 1.7 Developing Applications 2 Deciding on Trading Standards 2.1 Agreeing Standards with Trading Partners 2.2 Defining Internal Document Types 2.3 Defining Data Labels 2.3.1 LIST DATA_LABELS Command 2.3.2 Partner-specific Data Labels 2.3.3 Data Label Supersets 2.4 Defining Validation Criteria 3 Planning Applications Within the System 3.1 Interfaced and Integrated Application 3.2 Applications and Nodes 3.3 Setting Up Tables 4 Writing Applications 4.1 The Tasks Involved 4.2 Calling the Interface Routines 4.2.1 The Sending Routines 4.2.2 The Fetching Routines 4.3 Including Data Definitions 4.4 Error Handling 4.5 Using Default Data in Documents 4.6 Tracking Documents 4.6.1 Sending and Reconciling Acknowledgements 5 Application Interface Routines DECEDI$START_SEND DECEDI$END_SEND DECEDI$START_GROUP DECEDI$END_GROUP DECEDI$PUT_DATA DECEDI$START_FETCH DECEDI$START_FETCHW DECEDI$END_FETCH DECEDI$GET_DATA 6 Running and Testing Applications 6.1 Compiling and Running Applications 6.2 Testing Applications 6.3 Diagnosing Errors 6.3.1 Interpreting Return Values 6.3.2 Reading the Error Log 6.3.3 Reading the Audit Trail 6.3.4 Reading the Internal File 7 Example Programs 7.1 Uses of the Example Programs 7.2 How the Example Programs Work 7.2.1 Load Parameters (Process 1) 7.2.2 Read Source Data (Process 2) 7.2.3 Write Data (Process 3) 7.2.4 Load Parameters (Process 4) 7.2.5 Read Data (Process 5) 7.2.6 Write Data (Process 6) 7.3 Data Flow of the Purchase Order Program 7.3.1 Data Structure of the Flat File 7.3.2 Parameter Files for the Purchase Order Program 7.3.3 How the Purchase Order Program Acts as an Interfaced Application 7.4 Data Flow of the Invoice Program 7.4.1 Structure of the Invoice Transaction Data Store 7.4.2 Parameter File for the Invoice Program 7.4.3 How the Invoice Program Acts as an Interfaced Application 7.5 Data Flow of the Shipment Notice Program 7.5.1 Screen Input Data 7.5.2 Parameter File for the Shipment Program 7.5.3 How the Shipment Notice Program Acts as an Integrated Application 7.6 Contents of the Parameter File 7.7 Data Mapping Structure 7.8 Calling the DEC/EDI Application Interface Routines 7.9 How to Run the Example Programs 7.10 Editing the Example Source Files A Mapping Data to EDI External Standards A.1 Purchase Order Mappings A.2 Invoice Mapping A.3 Shipment Notice Mapping EXAMPLES 7-1 Invoice Transaction Data Store Layout 7-2 Control Parameters 7-3 Data Labels and Default Parameters 7-4 Purchase Order Examples Data Mapping Structures FIGURES 1-1 Document Structure 1-2 Data Labels and Document Structure 1-3 Sending Documents 1-4 Receiving Documents 2-1 Data Labels and Document Structure 2-2 LIST DATA_LABELS Screen 3-1 Interfaced and Integrated Connection 3-2 Distribution of Applications and Application Services 4-1 LIST TABLES Screen 5-1 Item List Format 6-1 LIST DOCUMENT Screen 1 6-2 LIST DOCUMENT Screen 2 7-1 Generic Model of Example Programs 7-2 Purchase Order Send Data Flow 7-3 DECEDI$ORDERS_SEND.LIS Structure 7-4 Invoice Data Flow 7-5 Shipment Notice Send Data Flow 7-6 Shipment Application Screen 7-7 Data Mapping Overview TABLES 4-1 Document status values 5-1 Group Levels and Repeats 7-1 Purchase Orders Listing File A-1 Purchase Order Parameters A-2 Invoice Parameters A-3 Shipment Notice Parameters