To install the Acu4GL for Informix interface, perform the following steps:
Step One: Install Informix.
Install the Informix RDBMS and make sure it is operational. Acucorp 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 Two: Create a new runtime.
Create a new runtime that includes the Informix interface.
These are the steps for relinking the runtime system with the interface.
2a. Backup
Make a backup copy of your current runcbl.
2b. Creating 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.
First, create the Makefile.inf file by executing the command:
sh inf_inst [enter]
in the .../install directory
Next, you are asked to enter the directory where ACUCOBOLGT is installed. Type the information and push the [enter] key.
After that, you are asked which version of Informix you have installed. You have two choices:
For version 5.x, type 5 and push the [enter] key.
For version 7.x, type 7 and push the [enter] key.
Once you have entered the version, add the names of your C routines, if any, (.o) to the line starting with "SUBS=".
Now you are ready to relink your ACUCOBOL-GT runtime.
2c. Link the runtime system
Make sure you are in the directory containing the ACUCOBOL-GT runtime libraries and Makefile, and that all files named in Makefile are also in your current directory. At the UNIX prompt, type:
make <return>
This will compile sub.c and filetbl.c, and will then link the runtime system.
2d. Verify the link
Type:
runcbl -vv <return>
Check to see that the version of the Informix interface is reported to your screen. This will verify that the link was successful.
If no interface version number is displayed, this means that something isn't set up right. 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 where you are currently located.
Different versions of the UNIX operating system resolve this 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 where 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 Three: Copy runcbl to the correct directory.
Copy the new runcbl file 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.
The ACUCOBOL-GT license file for the runtime (runcbl.alc) and the license file for the Acu4GL interface 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 interface 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 where they were unloaded.
Step Four: Compile the sample program.
If you are using the C-shell, enter the command rehash.
Now try compiling and running the sample program with the following commands:
ccbl -zxd demo.cbl
runcbl