Connecting
to Multiple Databases and Gaining Access to Arrays
After installing a Progress Database Agent you should
find the following files in the openlink/bin directory:
setup.p and setup.i
setup.p is a Progress script program. When the program
runs it will ask you what databases you wish to connect to and generate a catalog file of
all the databases and tables within into a tableview file (.dat), and will
create its associated parameter file (.pf).
Doing this allows you to connect to multiple databases,
allows you to see all the tables in all databases from SQLTables, and allows you to use
arrays fields through ODBC.
Prior to running this program you must ensure that all
database servers for the databases you wish to include are running since the program will
need to connect to them.
Make sure that your $DLC environment variable is set
correctly to point to your DLC directory.
e.g. DLC=/dbs/progress/dlc
export DLC
Go to the openlink/bin directory, and type the following:
$DLC/bin/pro -p setup.p
Note. - This may vary between versions. In
Progress 6, pro is in the dlc directory not dlc/bin.
You may also need to set a PROPATH environment variable
to include the current working directory and the directory containing the setup.p utility
files.
You will get the following screens:
@@@@@@ @@@@@@ @@@@@@@ @@@@@ @@@@@@ @@@@@@@ @@@@@ @@@@@
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @
@@@@@@ @@@@@@ @ @ @ @@@@ @@@@@@ @@@@@ @@@@@ @@@@@
@ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @@@@@@@ @@@@@ @ @ @@@@@@@ @@@@@ @@@@@
Progress Software Corporation
14 Oak Park
Bedford, Massachusetts 01730
617-280-4000
PROGRESS is a registered trademark of Progress Software Corporation
Copyright 1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995
by Progress Software Corporation
All Rights Reserved
PROGRESS Version 7.3C as of Thu Jun 29 15:05:14 EDT 1995
+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database. |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName Connect String OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 ______________________________ ________________________________________ __|
| |
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------------------------------------------------------+
Enter data or press PF4 to end.
At this point you will need to give the program
information to contact the databases you want to include here. As shown below.
+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database. |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName Connect String OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ __|
| |
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------------------------------------------------------+
Enter data or press PF4 to end.
After entering the line of information press return. There
will be a little pause while the program checks that the database server is running and
can be contacted. When this is verified OK will appear at the end of the line.
+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database. |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName Connect String OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
| |
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------------------------------------------------------+
Enter data or press PF4 to end.
The cursor will move to the next line. Repeat the above
procedure for each database. Press PF4 when finished. You will then need to supply the
name for the .dat and .pf files to be created.
+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database. |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName Connect String OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
| 2 ______________________________ ________________________________________ __|
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------------------------------------------------------+
Basename for .pf and .dat files_____________________
Enter data or press PF4 to end.
After a brief period the program will have finished:
+-----------------------------------------------------+
| Enter a number of databases you want to connect to. |
| The first database is your master database. |
+-----------------------------------------------------+
+-----------------------------------------------------------------------------+
| # DbName Connect String OK|
|-- ------------------------------ ---------------------------------------- --|
| 1 /users/progress/dbs/pro7test__ -N tcp -H 194.152.95.26 -S pro7test_____ OK|
| 2 ______________________________ ________________________________________ __|
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------------------------------------------------------------------+
Creating .pf file to use
Creating .dat file with table information
Procedure Complete. Press space bar to continue.
Now you have integrate these files into your system.
In the rulebook (the file oplqb.ini in the openlink/bin
directory) go to the Progress environment section, if you are using Progress 7 then the
section will be called [Environment PROGRESS7], and add the key:
TABLEVIEW=<full path and file name to .dat file>
Now either in the agent section or the client datasource
setup you only need to add the following connect options:
-pf <full path and file name to .pf file>
In the datasource this would be in the options field, in
the agent section [generic_pro7] you would add the key ConnectOptions = -pf <full
path and file name to .pf file>.



|