Host Transport Protocol “EOE” (Order Entry)

This DDE transport protocol passes customer orders received by the PC to the Host in chronological sequence on a line by line basis. The Host program is therefore essentially a modified version of that used to raise an order manually.

Handshake Subroutine Flowchart

Used within the main procedure to handle possible overrun errors at the PC end.

Main Procedure Flowchart

Click on a box for details.

The protocol is designed for both attended and unattended operation and incorporates fail-safe principles to simplify recovery should the interface between Host and PC fail at any point. Normal DDE shutdown occurs only between orders and is effected either by pressing Esc at the PC or by the Host program issuing a Break frame.

Protocol Syntax

  1. The Host activates DDE by sending the Title frame:
    PIC X(4)DDE Protocol Identifier:
    VALUE “EOE ”
    PIC XEOE Protocol Version Tag:
    VALUE “3”
    PIC XAutodial Procedure Identifier:
    VALUE “U”
    PIC XAutodial Mode:
    VALUE “W” to hang-up modem 2 sec after dialling,
    VALUE “1” to dial once and listen for remote carrier.
    PIC XAutodial Channel (overriding Telecom Options dialog),
    VALUE SPACE (use Telecom Options dialog setting).
    PIC XVALUE SPACE (filler)
    PIC X(50 max)Autodial Telephone Number and optional Name (CR precedes name if present).

    For unattended operation, or for attended manual operation, omit all the autodial fields (this reduces the Title frame to five bytes). To autodial a number and then allow the user to speak to the other end, specify Autodial Mode W.

    Backward compatibility. If EOE Protocol Version Tag is VALUE “2” or less or omitted, the PC sends the “old” format Order Header frame (at step 2). If EOE Protocol Version Tag is VALUE “1” or omitted, the PC sends GS instead of the Order Trailer frame (at step 6). Omitting the tag also suppresses Queue Empty frames from the PC (at step 2).

  2. Either the Host sends an Account frame (then go to step 4):
    PIC XXVALUE “#1”
    PIC X(variable)Customer information, e.g. Phone Number & Account Number
    or the Host sends a Reject frame (then go to step 2 for the next Order Header):
    PIC X(4)VALUE “*** ”
    PIC X(20 max)Explanation, e.g. “Invalid Access Code”
    or the Host sends a Continue frame (then go to step 2):
    PIC XXVALUE “#C”
    PIC X(12)(optional) Current Date & Time “ddmmyyhhmmss”

    The Continue frame is the Host’s normal response to a Queue Empty frame. If Current Date & Time are given, the PC synchronises its clock accordingly.

    or the Host sends a Break frame (then go to step 2):
    PIC XXVALUE “#B”

    After receiving a Break frame the PC will send ESC at step 2, thus terminating DDE.

    or the Host sends a Wait frame (then go to step 2):
    PIC XXVALUE “#W”
    PIC X(variable)Explanation (zero or more printable lines separated by CR).

    The Wait frame is the Host’s response to an Order Header frame which it is temporarily unable to process (e.g. because a system backup is in progress). The PC displays Explanation in the centre of its Terminal Screen and sleeps for twelve seconds before re-issuing the same Order Header frame at step 2.

  3. The Host sends the Invoice Address frame:
    PIC X(variable)Zero or more printable lines separated by CR.
  4. The Host sends the Delivery Address frame:
    PIC X(variable)Zero or more printable lines separated by CR.
  5. Either the PC sends the next Order Line frame:
    PIC X(8)Product Code, viz. one of:
    PIP Code (right justified with leading zeros), or
    BCL Code (right justified with leading zeros), or
    LINK Code (capitalised, stripped of leading zeros and left justified with trailing spaces), or
    VALUE “EAN CODE” (see last field)
    PIC 9(5)Quantity Ordered
    PIC XVALUE SPACE if no Back Order request,
    VALUE “B” if Back Order request.
    PIC XVALUE SPACE if Quantity Ordered is in Units,
    VALUE “C” if Quantity Ordered is in Cases.
    PIC XVALUE SPACE (spare)
    PIC 9(13)EAN Code (right justified with leading zeros) (this field is omitted unless Product Code is VALUE “EAN CODE”)
    or the PC sends US if it did not receive the previous frame correctly (Host must repeat previous frame and return to step 6).

    To simplify the protocol, the PC will never send US after the Delivery Address frame.

    or the PC sends the Order Trailer frame if there are no further lines (go to step 8):
    PIC XXVALUE “#T”
    PIC 999Count of Order Lines received from customer
    or the PC sends FS if the order is to be cancelled (go to step 10).

    The PC cancels an order only if the connection with the remote system is lost before the current order is completely received.

    or the PC sends ESC to abort DDE.

    The PC aborts DDE here only if it has been forced into Terminal Mode (e.g. by power fail or reboot). The Host must cancel the current order (returning any stock seized) then revert to Terminal Mode.

  6. Either the Host sends a Line Outcome frame (then go to step 6):
    PIC XLine Outcome flag, e.g.:
    VALUE SPACE if full delivery expected,
    VALUE “T” if temporarily out of stock,
    VALUE “B” if Back Order created,
    VALUE “M” if manufacturer cannot supply,
    VALUE “N” if Product Code on file but not stocked,
    VALUE “*” to defer reporting the line outcome to a Late Line Outcome frame.
    PIC 9(5)Quantity short (in Units not Cases).
    PIC X(43)Description including Pack Size, Units & Presentation.

    When the Line Outcome flag is VALUE “*” the Quantity short should be the full quantity ordered (if no Late Outcome frame is received for this line the PC assumes the item is not stocked).

    or the Host sends a Null frame indicating Product Code not on file (then go to step 6):
     (This is an empty frame.)

  7. Either the Host sends the Order Outcome frame (then go to step 2):
    PIC X(24 max)Text, e.g. Invoice Serial Number and Value.
    or the Host sends a Late Line Outcome frame (then go to step 9) to modify the outcome of any line with Line Outcome flag VALUE “*” at step 7:
    PIC XXVALUE “#L”
    PIC 9(5)Line number in Order
    PIC XLine Outcome flag (as defined at step 7).
    PIC 9(5)Quantity short (in Units not Cases).
  8. Either the PC sends GS in acknowledgement (go to step 8),
    or the PC sends US if it did not receive the previous frame correctly (Host must repeat previous frame and return to step 9),
    or the PC sends ESC to abort DDE.
  9. The Host returns any stock seized, then sends a Null frame (then go to step 2):
     (This is an empty frame.)

Debugging tips for Host Transport Protocol EOE

  1. Before running the PC application, install the file TELECOM (available on request) in the PC application's working directory. This file holds test orders and avoids the need to deliver orders to the PC.
  2. Use command-line switches to activate both /T and /K. On starting the PC application, check in the box on the Terminal Session screen that both /Trace and /Kybd are on.
  3. You must activate the PC's Telecom Session in order to make DDE Protocol EOE available to the Terminal Session. Do this by setting the Telecom Port (in the Change settings dialog) non-zero. More specifically, the following limitations apply due to the allocation of Interrupt Request (IRQ) levels on the PC:
    If the Host (Terminal Port) is:Then the Telecom Port must be configured as:
    COM1COM2 or COM4
    COM2COM1 or COM3
    COM3 COM2 or COM4
    COM4 COM1 or COM3

    When you use the test order file, not only is there no need to connect a modem to the Telecom Port, but the port itself need not physically exist either.

  4. Activate protocol EOE. The PC will submit any Pending orders in its queue to the Host, otherwise it sends Queue Empty frames every twelve seconds.
  5. See Debugging DDE Applications for information about the Trace file and Overrun testing
  6. In the Telecom Session's Queue Enquiry/Amend screen, change the Status of one or more orders to Pending and escape to the Main Menu to re-submit as often as you like.
  7. To simulate the cancellation of an incoming order (due to premature disconnection), set the last order in the Telecom Queue to status Pending and, in the Terminal Session, press the letter k (in lower case) on the PC keyboard whilst the Host is processing this order.

    This test only works properly on the last order in the queue (the /Trace and /Kybd switched must both be on too). The PC may loose track of its position in the Telecom Queue after this test. To correct, shut down, delete TELECOM.REF, restart.

The Protocol Handbook