Installation Steps

To install the Acu4GL for Informix product, perform the following steps:

Step 1: Install Informix

Install the Informix RDBMS and make sure it is operational. Micro Focus does not provide this product. Make sure you install the libraries in the appropriate directories, based on the Informix documentation.

We recommend that you obtain Interactive SQL (ISQL) or dbaccess if possible. This is not mandatory, but it will give you quite a bit of flexibility. ISQL allows you to do database work outside of COBOL, including interactive queries and reports. ACUCOBOL-GT’s standard file utility, vutil, cannot be used on Informix tables.

One way to test the installation of Informix is to access Interactive SQL and examine the stores database.

Step 2: Create a new runtime

Create a new runtime system that includes the Informix Acu4GL product.

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.

2a. Backup

Make a backup copy of your newly installed runcbl or libruncbl.so.

2b. Create a Makefile.inf file

The “inf_inst” program can be run to create a Makefile.inf file.

Note:

Please read the reference section at the start of the inf_inst script for the latest information regarding the Makefile.ini and database or platform differences.

  1. First, create the Makefile.inf file by entering the following command:
    sh inf_inst

    in the …/install directory.

  2. Next, you are asked to enter the directory where ACUCOBOL-GT is installed. Type the information and press Enter.
  3. After that, you are asked which version of Informix you have installed. You have four choices:
    • For version 5.x1, enter “5”.
    • For version 7.2 32-bit, enter “7”.
    • For version 7.3 or for version 9, enter “3”.
    • For version 7.3 64-bit, enter “4”.
  4. Once you have entered the version, add the names of your C routines (.o), if any, to the line starting with SUBS=.
Note:

The if_inst script generates a makefile that may require slight modifications. Make sure that the FSI_LIBS line in your makefile is correct.

Now you are ready to relink your ACUCOBOL-GT runtime.

2c. Link the runtime system

  1. Make sure you are in the directory containing the ACUCOBOL-GT runtime system. Then, at the UNIX prompt, enter the following command:
    make clean

    to ensure that you have a clean directory in which to build your runtime.

  2. Now enter the following command:
    make -f Makefile.inf

    or

    makerun

    This compiles sub.c and filetbl.c and then links the runtime system.

2d. Verify the link

  1. Enter the following command:
    runcbl -vv
  2. Check to see that the version of the Informix Acu4GL is reported to your screen. This will verify that the link was successful.
  3. If no Acu4GL version number is displayed, this means that something isn’t set up properly.
    • Check filetbl.c to make sure that USE_INFORMIX is set to “1” (Step 2b).
    • Then check Makefile for accuracy (see Step 2c), and relink (Step 2d).

Shared libraries

If you have relinked the ACUCOBOL-GT runtime and receive an error message of this type when you try to execute it:

Could not load library; no such file or directory

Can’t open shared library . . .

this may mean that your operating system is using shared libraries and cannot find them. This can occur even if the shared libraries reside in the same directory in which you are currently located.

Different versions of the UNIX operating system resolve this issue in different ways, so it is important that you consult your UNIX documentation to resolve this error.

Some versions of UNIX require that you set an environment variable that points to shared libraries on your system. For example, on an IBM® RS/6000® running AIX® 4.1, the environment variable LIBPATH must point to the directory in which the shared libraries are located. On HP/UX, the environment variable that must be set to point to shared libraries is SHLIB_PATH. On UNIX SVR4, the environment variable is LD_LIBRARY_PATH.

Be sure to read the system documentation for your operating system to determine the appropriate way to locate shared libraries.

A second way to resolve this type of error is to link the libraries into the runtime with a static link. Different versions of the C development system use different flags to accomplish this link. Please consult the documentation for your C compiler to determine the correct flag for your environment.

Step 3: Copy runcbl to the correct directory

If the runtime is a statically linked runcbl, copy the new executable to a directory mentioned in your execution path. This file needs to have execute permission for everyone who will be using the compiler or runtime. This step is not necessary when the runtime system is a shared library.

The ACUCOBOL-GT license file for the runtime (runcbl.alc) and the license file for the Acu4GL product to Informix (runcbl.ilc) must be copied into the same directory as the runtime executable.

If you rename your runtime executable, be sure to rename your license files to use the same base name, with the extensions unchanged. For example, if you rename your runtime to be myprog, then the license file for the Acu4GL product for Informix should be renamed myprog.ilc, and the license file for the runtime should be renamed myprog.alc.

The remaining files can be left in the directory in which they were unloaded.

Step 4: Compile the sample program

  1. If you are using the C-shell, enter the command rehash.
  2. Now try compiling and running the sample program with the following commands:
    ccbl   -Zd -Fx  demo.cbl
    runcbl demo.acu
Note:

You can also run the sample program using runtime flags, if necessary.