SQL package names

IBM® i Access ODBC and OLE DB packages are named differently depending on the database that is accessed.

The database server is sometimes used as a gateway to other relational databases that use DRDA . The database server automatically creates one or more SQL packages on the target relational database. The package names are generated according to the attributes currently used by the database server.

Package name if not a Db2 for i relational database

The package is created in a collection called QSQL400 on the application server, when it is not a Db2® for i relational database (RDB). When it is not a IBM i application server, the package name is QZD abcde, in which abcde corresponds to specific parser options being used.

The following table shows the options for the package name.

Package name field options

Field Field description Options
a Date format
  • ISO, JIS
  • USA
  • EUR
  • JUL
b Time format
  • JIS
  • USA
  • EUR, ISO
c Commitment control/ decimal delimiter
  • *CS/period
  • *CS/comma
  • *CHG/period
  • *CHG/comma
  • *RR/period
  • *RR/comma
d String delimiter
  • apostrophe
  • quote
e Maximum number of statements allowed for package
  • 0 - 64
  • 1 - 256
  • 2 - 512
  • 3 - 1024

Package names if the relational database is Db2 for i

When it is a IBM i application server, the package name is QZDA abcdef, in which abcdef corresponds to specific parser options being used.

When it is a IBM i RDB, the package is usually created in the QGPL library which most database access clients can customize.

Package name field options

Field Field description Options
a Date format
  • ISO, JIS
  • USA
  • EUR
  • JUL
  • MDY
  • DMY
  • YMD
b Time format and naming convention
  • ISO, JIS and SQL naming
  • USA and SQL naming
  • EUR and SQL naming
  • HMS and SQL naming
  • ISO, JIS and system naming
  • USA and system naming
  • EUR and system naming
  • HMS and system naming
c Commit level and decimal point
  • *CS/period
  • *CS/comma
  • *ALL/period
  • *ALL/comma
  • *CHG/period
  • *CHG/comma
  • *NONE/period
  • *NONE/comma
d String delimiter
  • apostrophe
  • quote
e Number of sections in package
  • 0 - 64
  • 1 - 256
  • 2 - 512
  • 3 - 1024
f Date and Time separation
  • The high order bits of the character:
  • '1100'b - One of the ISO formats for da
  • '1101'b - Comma as date separation
  • '1110'b - Period as date separation
  • '1111'b - Colon as date separation
  • The low order bits of the character:
  • '0001'b - An ISO format of time
  • '0010'b - Comma as time separator
  • '0011'b - Period as time separator
  • '0100'b - Slash as time separator
  • '0101'b - Dash as time separator
  • '0110'b - Blank as time separator