This chapter addresses the IBM ST: Server, Database feature and the other VisualAge and IBM Smalltalk database features. It covers: setting up your workstation and host to begin using SQL statements written in Smalltalk; invoking structured query language (SQL) statements against DB2 databases; implementing stored procedures; and making database server applications using VisualAge database nonvisual parts or solely Smalltalk code.
Much of this chapter covers making DB2 applications that will run on OS/390. However, you can use VisualAge nonvisual database parts or database Smalltalk code to create applications that run on Windows NT, OS/2, AIX, Sun Solaris, and other server environments. Materials on database features in the VisualAge Smalltalk Database Guide and the VisualAge help explain how to use the database nonvisual parts or Smalltalk code to create server, as well as client, applications. VisualAge Smalltalk Server Guide illustrates how you might use database nonvisual parts in a server application.
When you package database applications for a server envirnment, ensure that you make the images headless so they can run.
The environments in which database nonvisual parts and code are supported
are stated in the following table.
Table 1. Supported environments for database nonvisual parts or code
Environment | Nonvisual parts using CLI | Nonvisual parts static | Query specs, static SQL code, and dynamic SQL code |
Native Windows NT | Yes | Yes | Yes |
Native OS/2 | Yes | Yes | Yes |
Native AIX | Yes | Yes | Yes |
Native Solaris | Yes | Yes | Yes |
Native MVS | Yes | Yes | Yes |
Native MVS (Windows NT target) | Yes | Yes | Yes |
Native MVS (OS/2 target) | Yes | Yes | Yes |
CICS for Windows NT | No | Yes | Yes |
CICS for AIX | No | Yes | Yes |
CICS for Solaris | No | Yes | Yes |
CICS MVS (Windows NT target) | No | Yes | Yes |
CICS MVS (OS/2 target) | No | Yes | Yes |
IMS (MVS target) | No | No | Yes |
IMS Batch using CAF | Yes | Yes | Yes |
IMS MPR | No | Yes | Yes |
Key: A "Yes" indicates that the parts or code will work in the environment. A "No" indicates that they will not work in the environment. |
Call Level Interface (CLI) is supported on all platforms with DB2 V5.1 (UDB). However, the transaction monitor environments CICS and IMS have their own interface to DB2 which does not support CLI. To use nonvisual parts and the DB2 support, you must use static SQL statements in the transaction monitor environments. Static SQL statements are precompiled before runtime.
VisualAge Smalltalk Server for AS/300e supports only the DB2 Call Level Interface and the nonvisual parts using it. In the following section, ODBC and CLI are used somewhat interchangably. IBM's CLI implementation on OS/400 is a superset of ODBC. Using Client Access/400 you can set up an ODBC datasource on your workstation to access the data on the AS/44 for testing. You then use the CLI support when running the application natively on the AS/400.