DBINFO structure

Use the DBINFO structure to pass environment information to user-defined functions and stored procedures. Some fields in the structure are not used for stored procedures.

DBINFO is a structure that contains information such as the name of the current server, the application run time authorization ID and identification of the version and release of the database manager that invoked the procedure.

The DBINFO structure includes the following information:

Location name length
An unsigned 2-byte integer field. It contains the length of the location name in the next field.
Location name
A 128-byte character field. It contains the name of the location to which the invoker is currently connected.
Authorization ID length
An unsigned 2-byte integer field. It contains the length of the authorization ID in the next field.
Authorization ID
A 128-byte character field. It contains the authorization ID of the application from which the stored procedure is invoked, padded on the right with blanks. If this stored procedure is nested within other routines (user-defined functions or stored procedures), this value is the authorization ID of the application that invoked the highest-level routine.
Subsystem code page
A 48-byte structure that consists of 10 integer fields and an eight-byte reserved area. These fields provide information about the CCSIDs of the subsystem from which the stored procedure is invoked.
Table qualifier length
An unsigned 2-byte integer field. This field contains 0.
Table qualifier
A 128-byte character field. This field is not used for stored procedures.
Table name length
An unsigned 2-byte integer field. This field contains 0.
Table name
A 128-byte character field. This field is not used for stored procedures.
Column name length
An unsigned 2-byte integer field. This field contains 0.
Column name
A 128-byte character field. This field is not used for stored procedures.
Product information
An 8-byte character field that identifies the product on which the stored procedure executes.
The product identifier (PRDID) value is an 8-byte character value in pppvvrrm format, where: ppp is a 3-letter product code; vv is the version;rr is the release; and m is the modification level. In Db2 12 for z/OS®, the modification level indicates a range of function levels:
  • DSN12015 for V12R1M500 or higher.
  • DSN12010 for V12R1M100.
Start of changeFor more information, see Product identifier (PRDID) values in Db2 for z/OS.End of change
Reserved area
2 bytes.
Operating system
A 4-byte integer field. It identifies the operating system on which the program that invokes the user-defined function runs. The value is one of these:
0
Unknown
1
OS/2
3
Windows
4
AIX®
5
Windows NT
6
HP-UX
7
Solaris
8
z/OS
13
Siemens Nixdorf
15
Windows 95
16
SCO UNIX
18
Linux®
19
DYNIX/ptx®
24
Linux for S/390®
25
Linux for IBM® zSystems
26
Linux/IA64
27
Linux/PPC
28
Linux/PPC64
29
Linux/AMD64
400
iSeries
Number of entries in table function column list
An unsigned 2-byte integer field. This field contains 0.
Reserved area
26 bytes.
Table function column list pointer
This field is not used for stored procedures.
Unique application identifier
This field is a pointer to a string that uniquely identifies the application's connection to Db2. The string is regenerated at for each connection to Db2.

The string is the LUWID, which consists of a fully-qualified LU network name followed by a period and an LUW instance number. The LU network name consists of a one- to eight-character network ID, a period, and a one- to eight-character network LU name. The LUW instance number consists of 12 hexadecimal characters that uniquely identify the unit of work.

Reserved area
20 bytes.