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.
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.
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.
sh inf_inst
in the …/install directory.
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
make clean
to ensure that you have a clean directory in which to build your runtime.
make -f Makefile.inf
or
makerun
This compiles sub.c and filetbl.c and then links the runtime system.
2d. Verify the link
runcbl -vv
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
ccbl -Zd -Fx demo.cbl runcbl demo.acu
You can also run the sample program using runtime flags, if necessary.