Progress/400
Product Guide
Connection Techniques
The various Progress clients that access DB2/400 databases use different techniques to communicate with the AS/400. As a result, some connection parameter requirements differ among clients:
The following sections provide examples for connecting to DB2/400 databases in the supported configurations. Regardless of the connection technique that you choose, you must first connect to the schema holder, then connect to the DB2/400 database. For example, if you choose to connect at startup, specify the schema holder and associated connection parameters before you specify the DB2/400 database and its associated connection parameters.
See the database access chapter of the Progress Programming Handbook for more information about connecting to a database and for details on choosing a connection technique.
Connecting at Startup
You can connect to both a schema holder and DB2/400 database files when you start a Progress client session. The following examples illustrate how to connect a Progress server for a schema holder for multiple users. If you want to connect to a schema holder in single-user mode, use the Single-user (-1) parameter.
NOTE: If you prefer to prompt the user for a user ID and password, see the "Application Security" section in Common Product Information."Windows Clients
This Windows example connects to a Progress server for a schema holder called abc in the
TEST
subdirectory and a DB2/400 database calledxyz
:
You can also include this line in a Windows program item definition to connect to your schema holder automatically.
UNIX Clients
This example shows a connection to a Progress server for a schema holder called abc and a DB2/400 database called
xyz
. The logical connection profile name is profile, the AS/400 user ID is username, and the password is password:
TCP/IP Connection Using the CONNECT Statement
Use the CONNECT statement to connect to a DB2/400 database from each of the Progress client types: Windows and UNIX. The following sample CONNECT statement is valid for Windows and UNIX clients. The example assumes that the Progress session was started by connecting to a schema holder for the DB2/400 database named
xyz
:
SNA Connection Using the CONNECT Statement
Use the CONNECT statement to connect to a DB2/400 database from the Windows client. The example below assumes that the Progress session was started by connecting to a schema holder for the DB2/400 database named
xyz
:
SNA and TCP/IP Connection Using Auto-connect
The auto-connect feature allows you to connect to databases automatically as required during program execution. To perform an auto-connect operation, Progress uses information stored in a schema holder to connect to a second application database. It does this before running compiled procedures that access the second database. The primary application database (that contains the auto-connect information) must be connected before Progress can perform an auto-connect.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |