SAS/ACCESS Interface to DB2
under UNIX and PC Hosts supports the following special queries. You
can use the queries to call the ODBC-style catalog function application
programming interfaces (APIs). Here is the general format of these
queries:
DB2::SQLAPI “parameter
1”,”parameter
n”
is required to distinguish
special queries from regular queries.
is the specific API
that is being called. Neither DB2:: nor SQLAPI are case sensitive.
is a quoted string
that is delimited by commas.
Within the quoted string,
two characters are universally recognized: the percent sign (%) and
the underscore (_). The percent sign matches any sequence of zero
or more characters, and the underscore represents any single character.
To use either character as a literal value, you can use the backslash
character (\) to escape the match characters. For example, this call
to SQLTables usually matches table names such as mytest and my_test:
select * from connection to db2 (DB2::SQLTables "test","","my_test");
Use the escape character
to search only for the my_test table:
select * from connection to db2 (DB2::SQLTables "test","","my\_test");
SAS/ACCESS Interface
to DB2 under UNIX and PC Hosts supports these special queries:
returns a list of database
aliases that have been cataloged on the DB2 client.
returns information
about the DBMS server and version. It returns one row with two columns
that describe the DBMS name (such as DB2/NT) and version (such as
8.2).