Database Connectors™ uses an ACUFH configuration file to determine how the run-time system should behave when interacting with data. This chapter describes the ACUFH configuration variable options that you can use to configure the run-time system for your relational database environment.
Before running Database Connectors, you must set the A_CONFIG environment variable to the name of the ACUFH configuration file. You may want to make and use a personalized copy of the ACUFH configuration file to avoid impacting other users. You could use the A_CONFIG environment variable to identify a personal ACUFH configuration file. For example:
SET A_CONFIG=directory name\file name
defines a configuration file with the name of your choice in the directory of your choice.
There are several variables that can be set in your ACUFH configuration file that affect the Database Connectors processing. Those listed below are applicable to any relational database management system (RDBMS) with which Database Connectors communicates. Some ACUFH configuration variables are database-specific; those variables are discussed in the individual database sections found in the appendices of this guide.
The following ACUFH configuration variables, briefly described here, apply to any RDBMS. For detailed descriptions, look in the Reference > Configuration Variables section of the Database Connectors documentation.
| Variable | Description |
|---|---|
| 4GL_2000_CUTOFF | Determines which two-digit years will be considered to be in the twentieth century and which will be considered to be in the twenty-first century |
| 4GL_8_DIGIT_CUTOFF | Determines whether to use 4GL_2000_CUTOFF for dates that don't use a format string and that are eight digits |
| 4GL_COLUMN_CASE | Tells Database Connectors to leave the case of the field names found in the eXtended File Descriptor (XFD) unchanged |
| 4GL_COMMIT_COUNT | Indicates the conditions under which you want to issue an automatic COMMIT-WORK operation |
| 4GL_CONVERT_DATE_ZERO | Allows Database Connectors to locate and return those records written using the date "01/01/01" |
| 4GL_DB_MAP | Enables you to set one map at a time by using FILE-PREFIX as a list of directories, each of which maps to a different database |
| 4GL_EXTRA_DB_COLS_OK | Allows the database table to have more columns than the COBOL program's corresponding file descriptor |
| 4GL_FULL_DATA_TEST | Allows you to specify whether an entire field is tested for illegal data or if only the first field is tested |
| 4GL_IGNORED_SUFFIX_LIST | Lists the case-independent suffixes to ignore when opening Microsoft SQL Server tables or DB2 tables |
| 4GL_ILLEGAL_DATA | Determines how COBOL data that is considered illegal by the database will be converted before it is stored in the database |
| 4GL_JULIAN_BASE_DATE | Sets the base date to be used for Julian date calculations |
| 4GL_USEDIR_LEVEL | Provides a method of mapping filenames (with directory information) to table names |
| 4GL_WHERE_CONSTRAINT | Allows you to override any value given in the external variable A4GL-WHERE-CONSTRAINT |
| DEFAULT_HOST | Designates the file system to be used for newly created files that are not individually assigned |
| filename_HOST | Assigns an individual data file to a file system |
| FILE_TRACE | Allows you to start file tracing without opening the debugger |
| XFD_DIRECTORY | Tells the run-time system the name of the directory that contains the XFD files built by the Compiler |
| XFD_MAP | Tells the run-time system to associate certain filenames with a particular XFD |
| XFD_MAP_RESETS | Determines whether setting XFD_MAP adds to or replaces the existing value |
| XFD_PREFIX | Defines a specific series of directories to search for XFD files |
To enable the dynamic redirection of the file handler, you need to set the following environment variables:
| Variable | Value |
|---|---|
| DYNREDIR | DYNCONFIG:EXPAND |
| FHREDIR | <fhredir_config> |
fhredir_config contains the redirection information, for example:
/f<VSAM_dir>\* /r ACUFH!ACUFH
where <VSAM_dir>\* means that any COBOL file that has an XFD in the directory specified by VSAM_dir will be redirected to the database.
You can replace the VSAM_dir\* with the full path, including the filename, for example:
/f<VSAM_dir>\DBFILE /r ACUFH!ACUFH
DYNREDIR=DYNCONFIG:EXPAND causes all filenames to be fully expanded into their pathnames. For example, if you have an entry:
/f<VSAM_dir>\* /r ACUFH!ACUFH
and a COBOL file called DBFILE, it will be expanded to:
<VSAM_dir>\DBFILE
If you are using VSAM and database files in the same COBOL program, you cannot have the VSAM files in the same directory as the XFD files if you are using wildcards like <VSAM_dir>\*. This is because the wildcard tells the run-time to redirect all COBOL files in the specified directory to the database. For example, if your VSAM file is VFILE and your XFD file is DBFILE.xfd and they are in a directory specified by <VSAM_dir>, you cannot use:
/f <VSAM_dir>\* /r ACUFH!ACUFH
This is because the DYNREDIR logic will try to redirect any file in that directory to the database, but we don't want to do this for VFILE because it is a VSAM file. You have to either specify the full path for the XFD like this:
/f <VSAM_dir>\DBFILE /r ACUFH!ACUFH
or put the XFD in a different directory and specify the directory with the wildcard, for example:
/f <XFD_dir>\* /r ACUFH!ACUFH
where XFD_dir is a directory where your XFD files reside and is different from the directory where your VSAM files reside. If you have a separate directory for your XFDs like this, you need to modify your COBOL program ASSIGN statement to specify the XFD_dir, for example:
ASSIGN TO DISK "<XFD_dir>\DBFILE"
In addition, you will need to modify your ACUFH configuration file and set XFD_DIRECTORY to XFD_dir so that the file handler can find your XFD files, for example:
XFD_DIRECTORY <XFD_dir>Copyright © 2009 Micro Focus (IP) Ltd. All rights reserved.