CLI
A call level interface (CLI) component is included as
part of the DB2 UDB for Windows 95 or Windows NT client. CLI is
an application programming interface (API) for relational database
access. Using CLI, client applications, such as QMF for Windows,
can connect to DB2 UDB servers and execute SQL statements.
For QMF for Windows to use CLI to connect to DB2, you first use
the DB2 UDB facilities to define your database servers and how to
connect to them.
Note:
This configuration is outside the control of QMF
for Windows.
Connectivity information is defined in the DB2 UDB client. Work
with your in-house networking staff to implement and support your
network configuration. QMF for Windows Technical Support cannot
provide support for these networking issues.
Once this configuration is complete, QMF for Windows needs the database alias in
order to connect to it.
The
primary advantage to using CLI is simplified configuration. If a
database is defined in the DB2 UDB client, its alias is the only
piece of configuration information needed in QMF for Windows.
The
disadvantages to using CLI are:
- Generally, performance is substantially worse than when using
a DRDA connection
- QMF for Windows only supports connecting to workstation and
z/OS databases
- You must use DRDA connections to access VSE and VM or iSeries
databases
To access a DB2 UDB server using CLI, the 32-bit version of QMF
for Windows must be able to establish a CLI connection from the
local host to the remote host via the DB2 UDB client.
Supported database connections
CLI connections require the runtime client from DB2 Universal
Database (UDB), version 5.2 or later. CLI connections are supported
to the following databases:
- DB2 for MVS - Version 2.3, Version 3.1, Version 4.1
- DB2 for z/OS - Version 5
- DB2 UDB Server for z/OS - Version 6 and later
- Database2 Server for VM/VSE - Version 3
- DB2 for iSeries - Version 4, release 3, and later
- DB2 Common Server - Version 1 and Version 2
- DB2 UDB (for workstation databases) - Version 5 and later
- DB2 Information Integrator
DB2 Connect is required (either the Personal Edition installed
locally or the Enterprise Edition installed on a gateway) for all
databases except:
- DB2 Common Server - Version 1 and Version 2
- DB2 UDB (for workstation databases) - Version 5 and later
- DB2 Information Integrator
Note:
CLI is not supported for DB2 for VSE and VM.
CLI configuration considerations
To configure a CLI connection with QMF for Windows, you
need to configure a connection to the DB2 Database using DB2 Connect
or CAE or the Client Configuration Assistant.
This
section describes how to make a connection via various protocols,
including TCP/IP, to the database on a server.
Note:
You will need the host name, port number, and database
name of the system to which you are connecting.
Add a database
The first phase in configuring a CLI connection with QMF
for Windows is to add a database:
- Start Client Configuration Assistant.
- Add a new database.
The Add Database SmartGuide dialog box opens.
- Choose the option, Manually configure a connection to a DB2 database.
- Press Next.
- Specify the protocol you are using.
- Select the target operating system.
- Specify the hostname and port number of the system to which
you are connecting.
- Press Next.
- Enter the database name, which is the location name or RDB name.
Note:
If you do not know the database name, run the
following SQL statement from any querying utility:
SELECT DISTINCT CURRENT SERVER FROM SYSIBM.SYSTABLES
- Press Next.
- Assign an alias to the database. The default is database name
from the prior dialog box.
- Press Done.
Set server parameters
The next phase is to set server parameters:
- Go to QMF for Windows Administrator.
- Click New.
The General dialog box opens.
- Enter a server name and set server security parameters.
The server name can be any label you want to assign to the server
definition on the main QMF for Windows Administrator screen.
- Click Next.
The Connection dialog box opens.
- Select Connect using DB2 UDB for Windows CLI.
- In the Database alias field at the bottom
of the window, enter the name of the database from Step 3.
Bind packages directly on the server
Use a CLI connection to bypass QMF for Windows to bind
packages on the server using DB2 Connect or CAE.
- Identify which files to bind.
- Access your QMF for Windows directory and expand the bnd\folder.
- Select the folder that corresponds to your server's
OS and version:
- DSN (02, 03, 04) = MVS
- DSN (05, 06) = z/OS
- SQLxx = UDBs, such as Windows 95, Windows
NT, Windows 2000, UNIX(R) (AIX)
- QSQ (03, 04) = iSeries (in QMF for Windows,
version 7.0)
- ARI (03, 05, 06, 07) = VM/VSE (in QMF
for Windows, version 7.0)
The binding files reside in the server folders.
- Go to your DB2 Connect or CAE program and launch the Client Configuration
Assistant.
- Select the server on which you want to bind the files.
- Click Bind.
The Bind Database dialog box opens.
- Select Bind user applications.
- Click Continue.
- Enter your user name and password.
- Click OK.
The Bind Applications dialog box opens.
- Return to the files you accessed in Step 1.
- Select these files to Add.
- Click OK.
