Common Questions and Answers

This topic contains some questions and answers specific to Acu4GL for Informix.

Question

How do I create new databases?

Answer

You have two choices: (1) you can use an Informix product, such as ISQL, to create a new database, or (2) you can use the program sql.acu provided with your Acu4GL product.

To use the sql.acu utility to create an empty database and grant access privileges to other users, enter the following command:

runcbl sql.acu

The program pauses to accept an SQL command. Enter the following:

CREATE DATABASE database-name
Note: If you want to use the transaction logging facility available in ACUCOBOL-GT, you must enable it for the database you are creating. The precise SQL command depends on the Informix engine you are using, as shown below.

For Informix-OnLine, enter the following command to use transaction logging:

CREATE DATABASE database-name WITH LOG;

For Informix-SE, enter the following command to use transaction logging:

CREATE DATABASE database-name WITH LOG IN 
   '/acct/f1992/acct_log';

If you are using an Informix database with transactions enabled, you must use ACUCOBOL-GT’s transaction management capabilities. (Either use START TRANSACTION and COMMIT, or compile with -fs, or use the sql.acu program to issue BEGIN WORK and COMMIT.) Using a transaction-enabled database without ACUCOBOL-GT’s transaction management capabilities results in the records not being locked and can generate error messages.

The program pauses to accept an SQL command. Now enter the following:

GRANT DBA TO PUBLIC

Then press Enter again to exit the program.

The database name may be up to ten characters and must contain only letters, digits, and underscores. The first character must be a letter.

The statement GRANT DBA TO PUBLIC gives the Database Administrator access privileges to all other users.

Question

Is it possible to use both Informix-OnLine and Informix-SE on the same machine?

Answer

Yes. You’ll need to tell the runtime which database engine to use. You do this by setting the environment variable SQLEXEC as shown here:

Informix-OnLine
     SQLEXEC =  ${INFORMIXDIR}/lib/sqlturbo
Informix-SE
     SQLEXEC =  ${INFORMIXDIR}/lib/sqlexec

Setting SQLEXEC tells the Informix utility programs and the ACUCOBOL-GT runtime which engine to access. This variable must be set before you execute the runtime. Only one engine (either OnLine or SE) can be used for any given execution of the runtime.

INFORMIXDIR is an environment variable that you must set to the location of your Informix product.

Question

What files do I need to link my C routines into Acu4GL?

Answer

From your ACUCOBOL-GT runtime medium you need:

If you are using AcuServer™, instead of linking clntstub.o, see the relinking instructions in your AcuServer User's Guide.

From your Acu4GL medium, you need all of the following that are present:

* These files are provided by Informix and should be located in the appropriate Informix directory.

Instructions for linking are given in Installation Steps.

Question

I could not find the secondary error number for a 9D in the documentation. What does the number mean?

Answer

The errors fall into three categories:

01 – 99 are Acu4GL codes and are described in Runtime Errors.

100 – 199 are ISAM errors and are explained in Informix manuals.

200 and up are Informix database errors and are explained in Informix manuals.

Question

Can the Acu4GL for Informix product support a full date/time format?

Answer

The finest time granularity that Informix will support is one hundredths of a second. To achieve this, you must be sure the code is correct in the DATE directive and specify a date-format-string in your COBOL application, as opposed to just a date.

Question

Are there any ACUCOBOL-GT library routines that do not work with, or would not make sense to use with Acu4GL for Informix?

Answer

Yes. There are two ACUCOBOL-GT library routines that either don’t work with or do not make sense to use with Acu4GL for Informix: C$COPY and C$RECOVER.