filename_HOST

The filename_HOST variable can be used to assign a newly-created file to a file system. This ACUCOBOL-GT runtime configuration file variable is used to assign an individual data file to a file system. Any file so assigned uses 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 DB2 file system, and all other files were to be Oracle files, you could specify:

DEFAULT_HOST  DB2
CUSTFILE_HOST  ORACLE

in the ACUCOBOL-GT runtime configuration file.

The DEFAULT_HOST variable specifies the file system to be used for all files not specified by filename_HOST.

You can use DEFAULT_HOST and filename_HOST in combination to assign your new files in a default with exceptions manner. For example, the following directives:

DEFAULT_HOST DB2
afile_HOST ORACLE
bfile_HOST ORACLE

mean that all new files except afile and bfile is be assigned to DB2, and those two files are assigned to Oracle.

Now suppose myfile1a and myfile1b both reside in mydb1, and myfile2a and myfile2b both reside in mydb2. With the following XFD directives:

DEFAULT_HOST DB2
a-oracle-database mydb1
myfile1a-HOST oracle
myfile1b-HOST oracle
myfile2a mydb2.dbo.myfile2a
myfile2b mydb2.dbo.myfile2b
mydb2-HOST oracle

the run time system uses the Oracle interface for myfile1a, myfile1b, myfile2a, and myfile2b and finds all the tables in the correct database. When the COBOL program opens myfile2a, the run time system translates that name to mydb2.dbo. myfile2a looks at the basename to determine the file system to use (mydb2). It then looks for mydb2-HOST to determine which file system to send the file requests to.