0.    INTRODUCTION

       This specification provides the definition of the Product
       exchange reconciliation message (PRODEX) to be used in
       Electronic Data Interchange (EDI) between trading partners
       involved in administration, commerce and transport.

1.    SCOPE

       This paper provides the definition of the United Nations
       Standard Product Exchange Message to be used in Electronic Data
       Interchange (EDI) between trading partners.

1.1   Functional Definition

       The Product Exchange Message is a communication between two
       trading partners with agreements for the loan of products to
       each other, to provide information about movements of products
       from and to various locations on particular dates.
       
       The message gives additional information on the outstanding
       balances of each product between the trading partners.
       
       No financial value is attached to the products and settlement
       is usually carried out between like products.

1.2   Field of Application

       The Product Exchange Message may be applied for both national
       and international trade. It is based on universal commercial
       practice within the petroleum industry and may eventually be of
       interest to other industries.

1.3   Principles

       Each product exchange is covered by a bilateral contract and
       exchange accounts are balanced at agreed period ends.
       
       Each contract will define the units in which the product (or
       group of products) should be measured. This is known as The
       Unit of Account.
       
       A transaction forms the basis on which Product Exchanges are
       reconciled. A Transaction is defined as: a change of product
       title supported by the required data set for Delivery
       note/Ticket; or subsequently agreed Adjustments, Rebrands or
       Transfers.
       
       There may be many transactions within an accounting period.
       
       The product exchanged is identified by its product name, supply
       location, mode of transport, and date.

2.    REFERENCES

       See UNTDID, Part 4, Chapter 2.6 UN/ECE UNSM - General Introduction,
       Section 1.

3.    TERMS AND DEFINITIONS

       See UNTDID, Part 4, Chapter 2.6 UN/ECE UNSM - General Introduction,
       Section 2.

4.    MESSAGE DEFINITION

4.1   Data Segment Clarification

       This section should be read in conjunction with the Branching
       Diagram and the Segment Table which indicate mandatory,
       conditional and repeating requirements.
       
       The following guidelines and principles apply to the whole
       message and are intended to facilitate the understanding and
       implementation of the message:
       
       All specified dates/times should be in the format
       'yymmdd'/'hhmm' unless all parties involved in the transaction
       agree that there is a functional requirement for an alternative
       format. Periods should be specified as whole numbers
       representing the required period as indicated in the format
       qualifier (weeks, months, etc.)
       
       Where a choice of code or text is given only the code element
       should be used wherever possible.
       
       Due to the high volume of data that will be usually trasnmitted
       in the Sales Data Report message, it is highly recommended to
       use codes for products and locations.  Conditional data that is
       not required in the message should not be included.
       
       Care must  be taken  that the segment qualifier in dependent
       segments do  not conflict with the segment qualifier of the
       trigger segment of a group.

0010 | UNH, Message header
       A service segment starting and uniquely identifying a message.
       The message type code for the Product exchange reconciliation
       message is PRODEX.
       
       Note: Product exchange reconciliation messages conforming to
       this document must contain the following data in segment UNH,
       composite S009:

       Data element  0065 PRODEX
                     0052 D
                     0054 95B
                     0051 UN

0020   BGM, Beginning of message
       A segment to indicate the type and function of the Product
       Exchange Message and to transmit its unique identifying number.

0030   DTM, Date/time/period
       A segment identifying the date and time that the statment was
       generated and the end period to which the transaction statement
       refers.

0040   MEA, Measurements
       This identifies the primary unit of account pertaining to the
       contract.

0050   NAD, Name and address
       A segment identifying the two partners involved in the
       transaction identified in the following message. In this
       message the segment is mandatory and must appear twice; once
       for each partner.


0060   Segment group 1: RFF-DTM
       A segment group to give the relevant exchange references
       (contract number with -if necessary- its dates) relating to the
       whole message.

0070      RFF, Reference
          A segment identifying the product exchange contract
          reference.

0080      DTM, Date/time/period
          A segment specifying general dates and, when relevant, times
          related to the reference.


0090   Segment group 2: IMD-QTY-SG3
       A group of segments giving transaction details of the product
       groups exchanged and opening and closing balances for the
       accounting period (or as a result of the transactions).

0100      IMD, Item description
          A segment identifying the product group exchanged between
          the interchange partners.

0110      QTY, Quantity
          A segment identifying the exchange balances for the contract
          during the period. It is used for opening balances and for
          closing balances.


0120      Segment group 3: LIN-GIS-LOC-DTM-MEA-QTY-TDT-SG4
          A group of segments giving transaction details for each
          exchange transaction effected during the period.

0130         LIN, Line item
             A segment identifying the product exchanged between the
             interchange partners.

0140         GIS, General indicator
             A segment identifying the transaction type (receipt,
             delivery etc) and (where required) duty status.

0150         LOC, Place/location identification
             A segment identifying e.g. the oil terminal location
             involved in sending and receiving the product.

0160         DTM, Date/time/period
             A segment identifying the date of supply.

0170         MEA, Measurements
             A segment identifying measurement information for the
             product exchanged.

0180         QTY, Quantity
             A segment identifying the quantity(ies) for the product
             exchanged.

0190         TDT, Details of transport
             A segment identifying the transport mode and appropriate
             movement identifier(s) for transaction.


0200         Segment group 4: RFF-DTM
             A group of segments identifying some unique number for
             each transaction.

0210            RFF, Reference
                A segment identifying the consignment note, ticket
                reference or some unique number for each transaction.

0220            DTM, Date/time/period
                A segment specifying general dates and, when relevant,
                times related to the reference.

0230   UNT, Message trailer
       A service segment ending a message, giving the total number of
       segments in the message and the control reference number of the
       message.

4.2   Data segment index (Alphabetical sequence by tag)

          BGM Beginning of message
          DTM Date/time/period
          GIS General indicator
          IMD Item description
          LIN Line item
          LOC Place/location identification
          MEA Measurements
          NAD Name and address
          QTY Quantity
          RFF Reference
          TDT Details of transport
          UNH Message header
          UNT Message trailer

Contents of D.95B