Installation Under UNIX

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:

  1. 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.
  2. Insert the installation CD-ROM, floppy disk, or tape into its corresponding device. The instructions for installing from CD-ROM are provided on a Getting Started card supplied with the CD-ROM. If you are installing from floppy or tape, change (cd) into the target directory and extract the AcuSQL software.

    Because the software is in TAR format, you should use a command similar to the following:

    tar xfv device_name

    where device_name is the appropriate hardware device on your system (for example, /dev/rfd0 or /dev/rmt0). Follow the instructions on the screen, entering your product code and product key when prompted.

  3. Relink the runtime system to include your ODBC API library.
    Note: 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.
    1. In the lib subdirectory (of the directory into which you installed AcuSQL), edit config85.c and set the value of NO_ACUSQL to 0.
    2. 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 documentationfor more information on shared libraries.)

    3. Also in Makefile, locate the lines:
      ACUSQL_FLAGS = -DNO_ACUSQL=1

      ACUSQL_LIBS = # no acusql runtime libraries are necessary

    4. Make sure that the above lines are commented out (use the comment character “#”).
    5. 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 “#”).

    6. Save and close Makefile.
    7. 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.

    8. 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.
  4. 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.
    1. If you haven’t already done so, perform sub steps 1 and 2 of item 3 above.
    2. Relink the pre-compiler by entering the following command:
      make acusql
    3. Move the new acusql executable file into the bin directory.