This DDE transport protocol downloads SDA transaction data or product records or customer records to floppy diskette for dispatch to Intercontinental Medical Statistics Ltd.
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.
PIC X(5) | SDA Code |
---|---|
PIC 9(6) | IMS Code |
PIC X | VALUE “+” if quantity positive, VALUE “-“ if quantity negative. |
---|---|
PIC X(4) | IMS/SDA Product Code |
PIC 9(6) | Quantity |
PIC 99999X | Product Code |
---|---|
PIC 9(4)V999 | Trade Price |
PIC XXX | Presentation |
PIC 9999V9 | Pack Size |
PIC XX | Pack Units |
PIC XXXX | SDA 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.
PIC 99999X | Account Number |
---|---|
PIC 999 | Address Number |
PIC X(5) | SDA Code |
PIC 9(6) | IMS Code |
PIC X(120 | Name & Address |
IMS will accept whatever record format is available. The PC will take address records to a maximum of 158 characters.
PIC X(4) | DDE Protocol Identifier: VALUE “FLOP” |
PIC X | Record 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 999 | Wholesaler Code. |
PIC 99 | Period Number. |
PIC 99 | Year Number. |
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,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.
The PC will always respond with ESC after the Host sends an empty frame.
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,FLOP terminates successfully only if the Host sent an empty frame at step 6.
The PC will always respond with ESC after the Host sends an empty block.
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.
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)
“x” is any value never used in the Data Record "Text" field.
"i" is in the range 0:76.
"j" is in the range 1:158 for Customers, 1:80 for Products.
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.