Browse Prior Art Database

SQLCODE Error Mapping File

IP.com Disclosure Number: IPCOM000122614D
Original Publication Date: 1991-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 157K

Publishing Venue

IBM

Related People

Hoffman, RD: AUTHOR [+6]

Abstract

The content of the SQLCA varies from product to product. A SQLCODE in one product may be different in another product, or the SQLCODE may be the same but the tokens are specified differently. In order to meet the objective of supporting existing Database Manager applications, the DRDA-1 AR will provide default mapping of SQLCODEs and tokens from DRDA-1 SQL databases to the Database Manager sqlcodes and tokens. In order to support new applications that need to see the original codes or which require different mapping, the DRDA-1 AR may be directed to use a specific SQLCODE mapping file.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 41% of the total text.

SQLCODE Error Mapping File

      The content of the SQLCA varies from product to product.
A SQLCODE in one product may be different in another product, or the
SQLCODE may be the same but the tokens are specified differently.  In
order to meet the objective of supporting existing Database Manager
applications, the DRDA-1 AR will provide default mapping of SQLCODEs
and tokens from DRDA-1 SQL databases to the Database Manager sqlcodes
and tokens. In order to support new applications that need to see the
original codes or which require different mapping, the DRDA-1 AR may
be directed to use a specific SQLCODE mapping file.

      The mapping file is a PC ASCII file which may be created and
edited using any PC ASCII editor.  A few guidelines are required for
the DRDA-1 AR to read the file correctly. The file is free form until
the first occurrence of a '&&'(double ampersand). From that point
until an x'1A' byte (EOF indicator) is encountered, the lines must be
blank or adhere to the following syntax:
in_code  - Contains one of the following values:
     SQLCODE   - the SQLCODE from the DRDA-1 database.
     U         - all undefined codes, i.e., codes not
                 specifically listed in this file. The
                 following out_code will contain a value to
                 which all undefined codes should be mapped.
                 If the following out_code is NULL, the mapped
SQLCODE will be equal to the original SQLCODE.
 P         - all undefined positive codes, i.e., codes not
specifically listed in this file. The following out_code will contain
a value to which all undefined positive codes should be mapped. If
the following out_code is NULL, the mapped SQLCODE will be equal to
the original SQLCODE.
     cc00-cc59 - the SQLSTATE from the DRDA-1 database.  The
following out_code will contain a value to which all SQLCODES in
SQLCAs whose SQLSTATE is equal to this value should be mapped (this
is true only if the original SQLCODE is not also contained in the
mapping file).  If the following out_code is NULL, the mapped SQLCODE
will be equal to the original SQLCODE.
                 If an in_code is listed more than once in the
mapping file, only the first occurrence will be used.  Subsequent
entries for that in_code will be ignored.
out_code  - Contains the output SQLCODE.  If this value is NULL, the
original SQLCODE is used.  If this value is not NULL, the original
in_code will be mapped to this value. In addition, the original
in_code will be 'pushed' onto the SQLERRD array within the SQLCA,
e.g., it will become the first entry in this array and the previous
entries 1-5 will become entries 2-6.
c         - The datatype of the token in this position is CHAR. This
is the default if neither c nor i is given. c before pos indicates
that the input token datatype is CHAR. c after pos indicates that the
o...