Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Operating Service Gateway for DB2 : Defining TIBCO Object Service Broker DB2 Tables

Defining TIBCO Object Service Broker DB2 Tables
Obtaining DB2 Table Definitions
There are two methods that you can use to obtain DB2 table definitions:
After creating your TIBCO Object Service Broker DB2 table definitions, you can bind them. This process is described in Binding TIBCO Object Service Broker DB2 Table Definitions.
Using the Gateway Method
To use the Gateway method, you must have a Gateway running. The Table Definer gets its DB2 table information from the DB2 catalog tables.
SERVERID Parameter
Use the SERVERID parameter to identify a pool of Gateways that are considered equivalent by the Data Object Broker. Using it provides access to more than one DB2 subsystem from a single Data Object Broker, or access to a single DB2 subsystem with different Gateway plans and different Gateway configurations.
To define TIBCO Object Service Broker DB2 tables, the Table Definer must be able to determine the DB2 subsystem from which to get the DB2 metadata. This is determined by the entry in the ServerID field in the DB2 table definition.
 
Note: If you specify I in the Dictionary field, the definer will attempt to use the extracted dictionary information and ignore the value in the SERVERID field. For details, see Using the Extraction Method.
Viewing the DB2 Tables/Procedures List
When you press PF4 on the Table Definition Screen, a list of DB2 Tables/Procedures appears, as shown below. Depending on the value in the Subtype of the Table Definition Screen, this list presents either the creators and their related tables (Subtype N), or the schemas and their related stored procedures (Subtype P or R) available from the DB2 subsystem via the gateway denoted by ServerID.

 
          List of available DB2 tables in e(X)ternal DB2 Dictionary
Creator: SYS*
Table: SQ*
-----------------------------------------------------------------------------
_ SYSIBM
SQTCOLPRIVILEGES
_ SYSIBM
SQTCOLUMNS
_ SYSIBM
SQTFOREIGNKEYS
_ SYSIBM
SQTPRIMARYKEYS
_ SYSIBM
SQTPROCEDURECOLS
_ SYSIBM
SQTPROCEDURES
_ SYSIBM
SQTSPECIALCOLUMNS
_ SYSIBM
SQTSTATISTICS
S=Select
PFKEYS: 3 = SELECT & EXIT ENTER = REFRESH 12 = EXIT

 
 
The values of the fields Creator (Schema) and Table (Procedure) on the Table Definition Screen are used as search pattern, with the asterisk (*) and question mark (?) wildcards allowed, and an empty value is considered identical to an asterisk. Accordingly, only those tables (procedures) are shown in the list, whose creator (schema) and name match those search patterns. You can then modify the search patterns displayed on the List Screen and press Enter to see the refreshed list.
If the 'S' line command is used, the definer adds to the Table Definition Screen those columns (parameters) of the respective table (procedure) whose names do not match the DB2 names of the fields already selected on Table Definition Screen.
Using the Extraction Method
By using the extraction method, you can store all DB2 table information in a TDS table. This means you can define TIBCO Object Service Broker DB2 tables without having an instance of the Gateway running. However, the data is static, so you must update it whenever any changes are made to new or existing DB2 table definitions.
Defining TIBCO Object Service Broker tables using the extraction method requires that the information about DB2 tables/procedures be copied into the TIBCO Object Service Broker internal dictionary tables.
Populate the @DB2SYSTBLS and @DB2SYSRTNS Tables
You can extract the metadata from DB2 (external dictionary) into a set of tables in TIBCO Object Service Broker (internal dictionary), so the definer can use them at the table definition time. The definer switches between, and transparently uses, the external and internal dictionaries as implied by the value - I or X - of the Dictionary field on the Table Definition Screen.
To extract information about the tables/procedures from a DB2 subsystem, you need a Service Gateway for DB2 to be running and available. Using a TIBCO Object Service Broker Workbench of your choice, run either of the following rules:
 
COPY@DB2TBLS(<sid>,<list of creators>)
COPY@DB2RTNS(sid>,<list of schemas>)
 
to extract information about the tables or the stored procedures, respectively. Both of these rules accept two parameters:
<sid> – the SERVERID of the Gateway to use; if empty/NULL, DEFAULT is assumed.
<list of creators/schemas> – a string of blank-delimited names, for example, 'SYSIBM DEVL7083 ABC'; if empty/NULL, information about the tables/procedures for all available creators/schemas is copied.
If the <list of creators> or <list of schemas> parameter is empty/NULL, the entire internal dictionary (all tables or all procedures, respectively) is cleaned up. However, if the list contains at least one value, only the tables/procedures pertaining to those values are removed from the internal dictionary. In both cases, the removal takes place prior to the beginning of the copy process. This approach allows you to easily construct a fresh copy of the entire DB2 dictionary or selectively refresh the metadata denoted by one or more particular creators/schemas.
Binding TIBCO Object Service Broker DB2 Table Definitions
You can bind a DB2 table definition but not its data. TIBCO Object Service Broker DB2 tables for which you request binding are bound to both the Execution Environment and the Gateway when they are accessed from a rule.
Rebinding
If you change a definition, it is automatically rebound in the Gateway.
Specifying Maximum Space Available
You can specify the maximum amount of space available to hold all TIBCO Object Service Broker DB2 table definitions by using the POOLSIZE gateway startup parameter. For details, see Gateway Parameters.
See Also
TIBCO Object Service Broker Application Administion for information on binding tables.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved