The default filename for the File Handler configuration file is extfh.cfg but you can use a different filename by setting the EXTFH environment variable. For example:
set EXTFH=/mydir/test.cfg
sets the filename to /mydir/test.cfg.
The File Handler configuration file enables you to alter File Handler parameters for individual files, or for all files. Settings which apply to all files are listed under the tag:
[XFH-DEFAULT]
while settings which apply to an individual file are listed under the individual filename, for example:
[TEST.DAT]
The settings for an individual file override the global settings. If you just specify the filename, it must be the resolved filename, that is, the filename that the File Handler uses after it has completed its filename mapping process. Alternatively, you can prefix the filename with the keyword INTERNAL, to signify that the filename is the name that is used in the SELECT clause; the settings will then be applied to the file that is identified at the conclusion of the filename mapping process. For example, if the ASSIGN mode is dynamic, and you code:
[INTERNAL:$myfile/outfile.dat] IDXFORMAT=8
where myfile is an environment variable holding the name of the directory where the folder is located, the settings will be applied to outfile.dat in that directory.
If the ASSIGN mode is external, and you had:
SELECT MYDATA ASSIGN TO EXTERNAL REALDATA
you could code:
[INTERNAL:REALDATA]
where any options which follow apply to the file to which the logical name "REALDATA" is mapped.
If, however, you have:
SELECT MYDATA ASSIGN TO '/directory/subdirectory/datadirectory/myfile'
you cannot use the INTERNAL option in extfh.cfg. The literal value in the SELECT statement must be replicated [inside square brackets] in extfh.cfg.
For more information on filename mapping see the section Filename Mapping in the chapter Filenames.
Filenames can use paths and DD_mappings but not wildcards or logic names. If you set the File Handler configuration option BASENAME=ON, you can specify filenames without paths. Note that the name of a file must match the mapped name in your program.