Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

ACUCOBOL-GT Environment Variables

ACUCOBOL-GT allows a program to interface with more than one external file system in the same program. To define a file system for use with a particular file, you need to set the filename_HOST configuration variable.

To specify the indexed file system that the program will use by default, you need to set the DEFAULT_HOST configuration variable.

For an introduction to ACUCOBOL-GT runtime configuration variables and the configuration file, see section 2.7, Runtime Configuration, in Book 1 of the ACUCOBOL-GT documentation set.

In This Section

CTREE_LIB

DEFAULT_HOST

filename_HOST

SET ENVIRONMENT ACUCOBOL-GT Verb

AIX 32-bit Server Shared Memory Requires EXTSHM ON

Previous Topic

Next Topic

CTREE_LIB

Specifies the full path of the c-tree library that ACUCOBOL-GT attempts to load. If CTREE_LIB is not defined then a library named mtclient.dll (Windows) or libmtclient.so (Unix) is searched in the path.

Windows

set CTREE_LIB=C:\FairCom\V11.x.x.COBOL\win32\Driver\ctree.cobol\ACUCOBOL\mtclient.dll

Unix

CTREE_LIB=/FairCom/V11.x.x.COBOL/linux.v2.6.x86.32bit/Driver/ctree.cobol/ACUCOBOL/libmtclient.so

export CTREE_LIB

Previous Topic

Next Topic

DEFAULT_HOST

DEFAULT_HOST specifies the default file system to be used for all file I/O. Setting DEFAULT_HOST to CTREE indicates usage of c-tree while setting it to VISION or leaving it unset indicates usage of Vision. For example, to make c-tree the default file system, set the environment variable DEFAULT_HOST as follows:

Windows

set DEFAULT_HOST=CTREE

Unix

DEFAULT_HOST=CTREE;

export DEFAULT_HOST

Previous Topic

Next Topic

filename_HOST

This variable specifies the file system to use for a particular file. For example, if DEFAULT_HOST is set to VISION, and the file CUSTOMERS is a c-tree file, you could set the environment variable CUSTOMERS_HOST as follows:

Windows

set CUSTOMERS_HOST=CTREE

Unix

CUSTOMERS_HOST=CTREE;

export CUSTOMERS_HOST

This definition directs the runtime to treat CUSTOMERS as a c-tree file. Note that the file name may not include any path or directory name and should not include the file extension.

DEFAULT_HOST and filename_HOST are described in detail in Appendix H, Configuration File Entries, in Book 4 of the ACUCOBOL-GT documentation set.

Previous Topic

Next Topic

SET ENVIRONMENT ACUCOBOL-GT Verb

When your program executes, each time a file is opened, the ACUCOBOL-GT runtime checks filename_HOST and DEFAULT_HOST to determine which file system to use. You can change the value of these variables, just before you open the file, by including the following:

SET ENVIRONMENT "DEFAULT_HOST" TO value

or

SET ENVIRONMENT "filename_HOST" TO value

Previous Topic

Next Topic

AIX 32-bit Server Shared Memory Requires EXTSHM ON

For proper operation of the shared memory communication protocol with the 32-bit c-tree Server on AIX, the environment variable EXTSHM must be set to ON in the environment in which the server is started, before starting the server.

If the server fails to start due to c-tree error 127, verify that EXTSHM ON is set in the environment before starting the process.

TOCIndex