4GL-2000-CUTOFF
This variable determines which two-digit years will be considered to be in the twentieth century, and which two-digit years will be considered to be in the twenty-first century.
This variable accepts a two-digit value. Two-digit years that are smaller than this value are considered part of the twenty-first century (2000 is added to these dates).
Two-digit years that are equal to or larger than this value are considered to be in the twentieth century (1900 is added to them).
The default value for this variable is 20.
4GL-8-DIGIT-CUTOFF
This variable determines whether to use the 4GL_2000_CUTOFF for dates that don't use a format string, and which are 8 digits in length. Setting this variable to "1" will cause the interface to apply the 4GL-2000-CUTOFF logic for 8-character long dates. The default value is "0".
4GL-COLUMN-CASE
This variable causes the Acu4GL interface to leave the case of the field names found in the XFD unchanged. Normally all field names are converted to lower case by Acu4GL (except for Oracle, which converts all values to upper case), and all hyphens are converted to underscores.
If this variable is set to UNCHANGED, then all field names are used unchanged when the database table is created. Be aware that hyphens are not converted to underscores in this situation. Most databases do not accept hyphens in column names, so the XFD must be modified by hand to replace hyphens with underscores.
Valid values for this variable are UNCHANGED and LOWER.
The default value is LOWER, which means that field names are converted to lower case and hyphens are converted to underscores.
4GL-ILLEGAL-DATA
4GL-ILLEGAL-DATA determines how COBOL data that is considered illegal by the database will be converted before it is stored in the database.
The default value is NULL. This causes all illegal data (except key fields) to be converted to null before it is stored.
The value CONVERTED causes the following conversions to occur:
Illegal LOW-VALUES: minimum possible value (0 or -99999...)
Illegal HIGH-VALUES: maximum possible value (99999...)
Illegal SPACES: zero (or 01/01/01 for a date field)
Illegal data in key fields is always converted, regardless of the value of this configuration variable.
4GL-JULIAN-BASE-DATE
This variable sets the base date to be used for Julian date calculations. It is used in conjunction with the DATE directive .
To define your own base date for Julian dates, set this variable to a date having the format YYYYMMDD.
The default value is set internally at 01/01/4713 BC. (The default is not expressible as YYYYMMDD, because dates before 1/1/1 are not allowed.)
For example, suppose your COBOL program uses dates in the form of the number of days since 12/31/1899. If you want to store these dates in a database accessed by Acu4GL, you can set your DATE directives to be $XFD DATE=JJJJJJ (make sure that the number of characters matches your date field). Then you should set the runtime configuration variable 4GL-JULIAN-BASE-DATE to 18991231.
A4GL-MAX-DATE
It is possible that invalid dates could be incorrectly written to the database. Invalid dates are written as NULL, but if the date is in the key, problems can occur. To avoid invalid date problems in this instance, use the A4GL-MAX-DATE configuration variable to set the high-value date.
The default date for A4GL-MAX-DATE is 20991231.
A4GL-MIN-DATE
As noted with the configuration variable immediately above (A4GL-Max-Date), invalid dates could be incorrectly written to the database. Invalid dates are written as NULL, but if the date is in the key, problems can occur. To avoid invalid date problems in this instance, use the A4GL-MIN-DATE configuration variable to set the low-value date.
The default date for A4GL-MIN-DATE is 19000101.
DEFAULT-HOST
If you are opening an existing file, most file systems linked into the runtime will be searched for the named file. If, however, you are creating a new file, you will need to tell the runtime which file system to use. You accomplish this with one of two configuration variables; the first is:
DEFAULT-HOST filesystem
This will designate the file system to be used for newly created files which are not individually assigned. If this variable is not given a value, the Vision file system is used.
Examples
DEFAULT-HOST INFORMIX
means that all new files will be Informix files unless individually assigned to another file system.
DEFAULT-HOST ORACLE
means that all new files will be Oracle files unless individually assigned to another file system.
See also
The filename-HOST variable, which specifies the file system to be used for one specific file.
filename-HOST
The second variable which can be used to assign a newly-created file to a file system is filename-HOST. This configuration variable is used to assign an individual data file to a file system. Any file so assigned will use the designated file system, and not the one specified by DEFAULT-HOST.
Substitute the base name of the file for filename. The name you substitute should not include any directory names and should not include a file extension.
Example
For example, if the file CUSTFILE were the only file you wanted to assign to the Vision file system, and all other files were to be Informix files, you could specify:
DEFAULT-HOST INFORMIX
CUSTFILE-HOST VISION
in the configuration file.
See also
The DEFAULT-HOST variable, which specifies the file system to be used for all files not specified by filename-HOST.
NOTE
You can use DEFAULT-HOST and filename-HOST in combination to assign your new files in a default with exceptions manner; for example, this set of directives:
DEFAULT-HOST VISION
afile-HOST ORACLE
bfile-HOST ORACLE
means that all new files except afile and bfile will be assigned to Vision, and those two files will be assigned to Oracle.
You can change the values of these variables during program execution by including in your code:
SET ENVIRONMENT "filename-HOST" TO filesystem
or
SET ENVIRONMENT "DEFAULT-HOST" TO filesystem
This enables you to change file systems during the execution of your program. (This is not the typical way to specify a file system; it is usually designated in the runtime configuration file, and is not changed in the COBOL program.)
XFD-DIRECTORY
XFD-DIRECTORY tells the runtime system the name of the directory that contains the data dictionaries built by the ACUCOBOL-GT compiler. The default value is the current directory.
Example
To tell the runtime that the dictionaries are stored in the directory /usr/inventory/dictionaries you would enter:
xfd-directory /usr/inventory/dictionaries
See also
The -Fo compile-time option , which tells the compiler where to put the dictionaries. So unless you have moved the dictionaries, you should use the same value for XFD-DIRECTORY that you used with the -Fo option.
XFD-MAP
XFD-MAP tells the runtime system to associate certain filenames with a particular XFD. It is read on each open. This enables you to use one XFD for many different files.
The XFD-MAP variable has this syntax:
XFD-MAP [pattern = base-xfd-name] ...
where pattern consists of any valid filename characters and may include * or ?. These two characters are special:
* matches any number of characters
? matches a single occurrence of any character
Examples
XFD-MAP CUST????=CUST matches both CUST0001 and CUSTOMER and causes them to be associated with the XFD cust.xfd.
XFD-MAP CUST*1=CUSTOMER matches CUST001 and CUST0001 and CUST00001 and causes them to be associated with the XFD customer.xfd.This is the end of the Compiler and Runtime Options section. Click the Contents button at the top of this window to return to the Table of Contents page.