ContentsIndexPreviousNext

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 the following in your code:

SET ENVIRONMENT "filename_HOST" TO filesystem

or

SET ENVIRONMENT "DEFAULT_HOST" TO filesystem

This enables you to change file systems furing 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.