Consultor Eletrônico



Kbase 17792: AS/400 Join Logical Files And The Progress/400 DataServer
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/7/2005
Status: Unverified

GOAL:

Does Progress/400 DataServer architecture support the use of DB2/400 Join Logical files?

FIX:

It has recently been uncovered that the Progress/400 DataServer architecture cannot fully support the use of DB2/400 Join Logical files.  There have been scenarios where OS/400 limitation prevents the DataServer from functioning as expected.  

The Progress environment has a concept of RECID that is similar in nature to the DB2/400 concept of relative record numbers.  Each record read from a DB2/400 file has a relative record number that is unique for the file being read.  However, since a join logical file is joining two or more physical files into one "view", the relative record returned is that of the primary file.  There is a very good
possibility that the same relative record number (RRN) is returned when reading a join logical file.

This problem can be illustrated using the two files below.

    customers   orders
    ---------   ---------
    custnum     custid
    name        ordernum
    contact     orderdate

The records in the file are as follows:

    CUSTOMERS:

    RRN   custnum    name                    contact
    ---   -------    --------------------    -------------
    1       15       Hoopla Basketball       Robert Johns
    2       16       Thundering Surf Inc.    Fran Horan
    3       17       High Tide Sailing       Angela Tackle

    ORDERS:

    RRN   custid   ordernum   orderdate
    ---   ------   --------   ---------
    1       15        58      01/29/93
    2       16        23      01/12/93
    3       16        41      01/20/93
    4       16       134      03/09/93
    5       17       112      02/29/93
    6       17       154      03/18/93

The joined file is created using customer as the primary and custnum
is joined to custid in orders.  When the join file is read, one record
will be returned for each record in the secondary file.  

When the join file is read the following data is returned:

Row RRN custnum name                 contact       ordernum orderdate
--- --- ------- -------------------- ------------- -------- ---------
1   1    15    Hoopla Basketball    Robert Johns      58   01/29/93
2   2    16    Thundering Surf Inc. Fran Horan        23   01/12/93
3   2    16    Thundering Surf Inc. Fran Horan        41   01/20/93
4   2    16    Thundering Surf Inc. Fran Horan       134   03/09/93
5   3    17    High Tide Sailing    Angela Tackle    112   01/29/93
6   3    17    High Tide Sailing    Angela Tackle    154   03/18/93

As displayed, non unique relative record numbers are returned.  This
in itself is a problem so the Progress/400 DataServer constructs a
unique RRN whenever a joined logical file record is read.  This newly
constructed unique number is returned to the client as a RECID.  The
client can then function properly except in the following instance:

When a browser is used and a reposition is attempted, the client sends
a read request to the server using a RECID.  Since the RECID is built
and not a real number, the join file is repositioned to the wrong
record.  Since the RECID returned to the client is never "correct",
the client cannot use it to achieve expected results.  This problem is
an OS/400 limitation and cannot be corrected in the Progress environment.