Host Transport Protocol “FLOP” (SDA Data Transfer)

This DDE transport protocol downloads SDA transaction data or product records or customer records to floppy diskette for dispatch to Intercontinental Medical Statistics Ltd.

Record Formats

The 8-byte SDA records have a binary format which is not described here.

The 11-byte SDA records may be blocked up to 21 records per frame.

11-byte SDA Header Record

PIC X(5)SDA Code
PIC 9(6)IMS Code

11-byte SDA Item Record

PIC XVALUE “+” if quantity positive,
VALUE “-“ if quantity negative.
PIC X(4)IMS/SDA Product Code
PIC 9(6)Quantity

Sample Product Record

PIC 99999XProduct Code
PIC 9(4)V999Trade Price
PIC XXXPresentation
PIC 9999V9Pack Size
PIC XXPack Units
PIC XXXXSDA Code
PIC X(30)Description

IMS will accept whatever product record format is available. The PC will take product records to a maximum of 80 characters.

Sample Customer/Address Record

PIC 99999XAccount Number
PIC 999Address Number
PIC X(5)SDA Code
PIC 9(6)IMS Code
PIC X(120Name & Address

IMS will accept whatever record format is available. The PC will take address records to a maximum of 158 characters.

Protocol Syntax

  1. The Host activates DDE by sending the Title frame:
    PIC X(4)DDE Protocol Identifier:
    VALUE “FLOP”
  2. The Host sends the Run Parameter frame (1 or 8 bytes):
    PIC XRecord Format:
    VALUE “F” if 8-byte SDA records (go to step 3),
    VALUE “S” if 11-byte SDA records (go to step 3),
    VALUE “A” if Customer Address File download (go to step 5),
    VALUE “D” if Product Description File download (go to step 5).
    PIC 999Wholesaler Code.
    PIC 99Period Number.
    PIC 99Year Number.
  3. SDA Transaction Download

    If the Run Parameter frame is one byte in length (Record Format only), the PC will be enabled to add SDA Transactions to any already on the current diskette. If the Run Parameter frame is eight bytes in length, the PC will delete any existing file SDA on the diskette and write a new header as specified.

    Either the PC sends GS if it is ready to receive the next frame,
    or the PC sends FS if it cannot accept any further frame (diskette is full),
    or the PC sends US if it did not receive the previous frame correctly (Host must repeat previous frame and return to step 3),
    or the PC sends ESC and terminates DDE program FLOP.

    FLOP terminates successfully only if the Host sent an empty frame at step 4. Any other termination implies failure and the download must be rerun from the beginning.

  4. Either the Host sends the next frame (if any and the PC sent GS at step 3) (go to step 3),
    or the Host sends an empty frame (go to step 3).

    The PC will always respond with ESC after the Host sends an empty frame.

  5. Customer or Product Download

    If the Run Parameter frame is one byte in length (Record Format only), the PC will assume the current period number etc. is to be used.

    Either the PC sends GS if it is ready to receive the next data block,
    or the PC sends US if it did not receive the previous frame correctly (Host must repeat previous frame and return to step 5),
    or the PC sends ESC indicating termination (go to step 8).
    or the PC sends ESC and terminates DDE program FLOP.

    FLOP terminates successfully only if the Host sent an empty frame at step 6.

  6. Either the Host sends the next data record (if any and the PC sent GS at step 5) (go to step 5),
    or the Host sends an empty frame (go to step 5).

    The PC will always respond with ESC after the Host sends an empty block.

SDA Transactions on Diskette

01	File Header
  03    Wholesaler Code   PIC 999
  03    Period            PIC 99
  03    Year              PIC 99

01      Customer Header
  03    IMS Brick         PIC 9(6)
  03    SDA Outlet        PIC X
  03    SDA Brick         PIC X(4)

01      Sales Detail
  03    Sign              PIC X VALUE "+" or "-"
  03    Quantity          PIC 999
  03    Product Code      PIC X(4)

01      File Trailer
  03    Flag              PIC X VALUE "?"
  03    Filler            PIC X(16) VALUE SPACES
  03    Order Line Count  PIC 9(7)

Records must be written in the sequence:
File Header { Customer Header { Sales Detail } } File Trailer
where { } indicates a repeating group. The File Trailer is optional but if present any further data is ignored.

Customers/Products on Diskette

01      File Header
  03    File Type           PIC X VALUE "A" (if Customer Addresses)
                            PIC X VALUE "D" (if Product Descriptions)
  03    Wholesaler Code     PIC 999
  03    Period              PIC 99
  03    Year                PIC 99
  03    Data Record Prefix  PIC X VALUE "x"
  03    Wholesaler Name     PIC X(i)
01      Data Record
  03    Record Prefix       PIC X VALUE "x"
  03    Text                PIC X(j)
01      File Trailer
  03    Record Prefix       PIC X VALUE "x"
  03    Record Prefix       PIC X Value "x" (repeated)
  03    Record Count        PIC 9(7)

Records must be written in the sequence:
File Header { Data Record } File Trailer
where { } indicates a repeating group. The File Trailer is optional but if present any further data is ignored.

The Protocol Handbook