Host Transport Protocol “GAS” (Glaxo Agency System)

This DDE transport protocol downloads Glaxo Transaction data onto the PC's hard disc for later processing by the PC's Glaxo Agency System Package (GASP). At monthend, the protocol uploads to the Host any Glaxo settlement discounts calculated by the GASP.

“DOPE” is an alias for the “GAS” protocol.

The protocol is enabled/disabled on the PC by the /D switch on the MS-DOS command line when starting GO.EXE.

Protocol Syntax

  1. The Host activates DDE by sending the Title frame:
    PIC X(4)DDE Protocol Identifier:
    VALUE “GAS ”
  2. The Host sends the Run Parameter frame (2 bytes):
    PIC XSoftware Platform:
    VALUE “C” to use COBOL conventions.
    VALUE “M” to use Machine Code conventions
    PIC XXSoftware Schema:
    VALUE “1” if Version 1.
    VALUE “E” if Emergency mode (disable format checking).
  3. Either the PC sends GS if it is ready to receive the next frame (go to step 4),
    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 GAS.
  4. Either the Host sends the next Data Block if any (go to step 3),
    or mark the transfer done (go to step 5).
  5. The Host sends an empty frame.
  6. Either the PC sends US if it did not receive the previous frame correctly (return to step 5),
    or the PC sends the next message frame if any (go to step 5),
    or the PC sends ESC and terminates DDE program GAS.

Data Blocks (Host to PC)

Each Data Block comprises a single record as defined in the Glaxo Agents' Programming Specification (version 2). The first byte indicates the Record Type:

A
Sales Data Header
L
Sales Data Line
T
Sales Data Trailer
C
Rebate Credit
D
Rebate Credit (Alias)
B
Stock Header
S
Stock Item

Associated Sales Data Header, Lines and Trailer records must be transferred consecutively. A Stock Header must precede any Stock Item records. Prior to and during any stock reconciliation transfer, the Host must ensure that no invoices/credits are awaiting processing and that all Glaxo goods received notes have been processed. Any Glaxo items in transit (not yet received) at the instant of reconciliation must subsequently also be loaded onto the standalone PC system as these must be included in the reconciliation data despatched to Glaxo.

Where a COBOL platform is specified, record layouts match the TRANSFER file formats. All numeric fields are to be zero filled and right justified, the decimal point is never to be presented. All alphanumeric fields are to be left justified and space filled. Do not append the CR LF.

A Machine Code platform follows the COBOL rules, except that Name, Address and Post Code are moved to the end of the record and are presented in the traditional format (variable length lines with separators) prefixed by the separator (CR, LF or “~”).

Message Frames (PC to Host)

Monthend Discount

PIC XXVALUE("MD")
PIC X(17)Customer Account Number
PIC 9(13)V99Settlement Discount Amount

A single Monthend Discount frame is sent for each Customer Account with non-zero Settlement Discount amount.

Monthend Trailer

PIC XXVALUE("MT")

A single Monthend Trailer frame is sent after the last Monthend Discount frame.

PC File “REBATE”: Record Layout

PIC X(17)Agent's Customer Code
PIC 9(13)V99Settlement Discount Amount

PC File “TRANSFER”: Record Layouts

Sales Header (247 bytes + CR + LF)

PIC XVALUE “A”
PIC X(17Agent's Customer Code
PIC X(35)Name
PIC X(35)Address Line 1
PIC X(35)Address Line 2
PIC X(35)Address Line 3
PIC X(35)Address Line 4
PIC X(8)Post Code
PIC 99Customer Category
PIC X(35)Serial Number
PIC XXXTransaction Code (“INV” or “CRE”)
PIC 9(6)Transaction Date (YYMMDD)

Sales Line (97 bytes + CR + LF)

PIC XVALUE “L”
PIC X(35)Original Serial Number (if Back Order Invoice)
PIC 9(9)Agent's Product Code
PIC 9(15)Quantity
PIC 9(13)V99Value at List (Trade) Price
PIC 9(13)V99Invoice Line Value
PIC 9(4)V999VAT Rate %

Sales Trailer (112 bytes + CR + LF)

PIC XVALUE “T”
PIC 9(4)V999VAT Code 3 Rate %
PIC 9(13)V99VAT Code 3 VAT Value
PIC 9(13)V99VAT Code 3 Goods Value
PIC 9(4)V999VAT Code 4 Rate %
PIC 9(13)V99VAT Code 4 VAT Value
PIC 9(13)V99VAT Code 4 Goods Value
PIC 9(4)V999VAT Code 5 Rate %
PIC 9(13)V99VAT Code 5 VAT Value
PIC 9(13)V99VAT Code 5 Goods Value

Stock Reconciliation Header (7 bytes + CR + LF)

PIC XVALUE “B”
PIC 9(6)Date (YYMMDD)

Stock Reconciliation Line (39 bytes + CR + LF)

PIC XVALUE “S”
PIC 9(9)Agent's Product Code
PIC 9(15)Stock Level
PIC 9(13)V99List (Trade) Price

Glaxo Rebate Credit (357 bytes + CR + LF)

PIC XVALUE “C”
PIC X(17)Agent's Customer Code
PIC X(35)Name
PIC X(35)Address Line 1
PIC X(35)Address Line 2
PIC X(35)Address Line 3
PIC X(35)Address Line 4
PIC X(8)Post Code
PIC 9(13)V99VAT Code 3 List Price Value
PIC 9(13)V99VAT Code 3 Rebate Value
PIC 9(4)V999VAT Code 3 Rate %
PIC 9(13)V99VAT Code 3 VAT Value
PIC 9(13)V99VAT Code 4 List Price Value
PIC 9(13)V99VAT Code 4 Rebate Value
PIC 9(4)V999VAT Code 4 Rate %
PIC 9(13)V99VAT Code 4 VAT Value
PIC 9(13)V99VAT Code 5 List Price Value
PIC 9(13)V99VAT Code 5 Rebate Value
PIC 9(4)V999VAT Code 5 Rate %
PIC 9(13)V99VAT Code 5 VAT Value

The Protocol Handbook