Note: In the following directions, the term
runtime system refers to the runtime shared object on systems where the ACUCOBOL-GT runtime is a shared object and to runcbl on other systems,
where the runtime is static. The runtime is a shared object on the following systems: AIX 5.1 and later, HP/UX 11 and later,
and Solaris 7 and later. To check, look at the contents of the
lib subdirectory of your ACUCOBOL-GT installation. If the files
libruncbl.so or
libruncbl.sl reside in that directory, the runtime is a shared object on your system.
To install AcuSQL on your UNIX host:
- We recommend that you install AcuSQL into your ACUCOBOL-GT home directory. When you install in this way, the AcuSQL libraries
and executables are added to the existing ACUCOBOL-GT
bin and
lib subdirectories. If you choose to install into a different directory, separate
bin and
lib subdirectories are created. You must include the location of the new
bin directory in the definition of your
path environment variable. No matter which directory you select for your installation, you must make sure that AcuSQL and the
ACUCOBOL-GT compiler executable (ccbl) are in the same subdirectory.
- Insert the installation CD-ROM. The instructions for installing from CD-ROM are provided on a Getting Started card supplied
with the CD-ROM.
Follow the instructions on the screen, entering your product code and product key when prompted.
- Relink the runtime system to include your ODBC API library.
Note: This step is not required if you are running a shared libraries build of the extend Interoperability Suite and are using one
of the supported driver managers:
unixODBC (
www.unixodbc.org);
DataDirect (
www.progress.com);
iODBC (
www.iodbc.org), and the driver manager's
lib directory is on the LD_LIBRARY_PATH.
Warning: Relinking the runtime requires access to the C compiler supplied by the vendor of your UNIX software; in some cases the C
compiler is offered as an add-on option. If the C compiler used to build the ODBC libraries creates files that are incompatible
with those created by the C compiler used to build the runtime, the link may fail.
- In the
lib subdirectory (of the directory into which you installed AcuSQL), edit
config85.c and set the value of
NO_ACUSQL to
0.
- Edit
Makefile and locate the line that reads:
ACUSQL_ODBC_LIB =
Add the name of your ODBC API library to the end of the line. For example:
ACUSQL_ODBC_LIB = ODBC_lib
where
ODBC_lib is the name of your ODBC API library. If you are working with DB2, the name of the library is
libdb.so. If you are working with MySQL, the name of the library is
libmyodbc3.
If this library is not statically linked, your operating system must be able to locate this library. On some systems, this
is accomplished by listing the directory in the environment variable LD_LIBRARY_PATH. (See your operating system documentation
for more information on shared libraries.)
- Also in
Makefile, locate the lines:
ACUSQL_FLAGS = -DNO_ACUSQL=1
ACUSQL_LIBS = # no acusql runtime libraries are necessary
- Make sure that the above lines are commented out (use the comment character “#”).
- Next, locate the lines:
#ACUSQL_FLAGS =
#ACUSQL_LIBS = $(ACU_LIBDIR)/libesql.a $(ACUSQL_ODBC_LIB)
Make sure that the above lines are un-commented (remove the comment character “#”).
- Save and close
Makefile.
- Relink the runtime system by entering the following commands:
make clean
make
The default target of the Makefile is the runtime system, so this relinks
runcbl on machines that do not have shared objects, and
libruncbl.so on those that do.
You can also relink the runtime system by executing the following command:
make relinkrun
This works on all systems.
If you get unresolved reference errors that refer to your ODBC library, you will need to further modify the
Makefile to include the needed libraries (see your ODBC API documentation). Such libraries can be added to the end of the LDFLAGS
lines, or at the end of the list for
runcbl and
acusql.
- If the runtime system is a statically linked
runcbl, move the new executable file into the
bin directory. This step is not necessary when the runtime system is a shared library. In these cases, the shared object runtime,
lib/libruncbl.so, is already in the correct location.
- If you plan to use the pre-compiler mode that connects directly to your database engine to verify the SQL syntax, you must
relink acusql to include your ODBC API libraries.
- If you haven’t already done so, perform sub steps 1 and 2 of item 3 above.
- Relink the pre-compiler by entering the following command:
make acusql
- Move the new acusql executable file into the
bin directory.