Using Catalog Stored Procedures (CSPs)

CSPs serve as a uniform catalog interface for accessing the system tables of different database management systems, including Adaptive Server.

Sybase provides CSPs that can be defined to TRS with the Mainframe Connect DB2 UDB Option. These CSPs correspond to transactions on the mainframe that access the DB2 UDB catalog and return information to a client application in a standard format.

CSPs are implemented as CICS transactions and must be configured as RPCs to TRS. See Chapter 4, “Accessing Catalog Information with CSPs,” for configuration instructions.

Table 3-7 outlines the functions provided by CSPs and the 4-character CICS transaction name that each procedure name maps to on the host:

Table 3-7: CSP functions

Procedure name

Related CICS transaction name

Function

sp_capabilities

SYSP

Returns information about the capabilities of the TRS

sp_columns

SYSP

Describes the columns of a table

sp_column_privileges

SYSP

Describes the column permissions of an object

sp_databases

SYSP

Lists the databases available

sp_datatype_info

SYCR

Describes the datatypes available

sp_fkeys

SYSP

Describes the primary key/foreign key relationships

sp_pkeys

SYSP

Describes the primary key for a table

sp_server_info

SYSP

Lists the configuration and capabilities

sp_special_columns

SYSP

Lists the optimal columns to uniquely identify rows and list columns that are automatically updated

sp_sproc_columns

SYSP

Describes the input/output of executable objects

sp_statistics

SYSP

Lists the index and statistics information about a table

sp_stored_procedures

SYSP

Lists the executable procedures

sp_table_privileges

SYSP

Describes the table permissions

sp_tables

SYSP

Lists the tables

sp_thread_props

SYCR

Returns minimal information at this time

For information about the mainframe installation, see the Mainframe Connect Installation and Administration Guide for DB2 UDB. For information about the syntax and operation of CSPs, see Chapter 4, “Accessing Catalog Information with CSPs,” in this guide.