File names interpretation
The isCOBOL Framework constructs the full-name of a file in this way:
1. If
iscobol.file.env_naming (boolean) is set in the configuration, the physical file name is searched between the environment variables. During this search hyphens are translated to underscores and names are made lowercase to be case insensitive before the comparison between file name and configuration property name.
Note: the conversion affects only properties set through SET ENVIRONMENT. For properties set in the external configuration, it’s your responsibility to use underscores and lowercase names, otherwise they will not match.
2. The physical name is made upper-case or lower-or depending on
iscobol.file.case setting.
5. Unless the file name starts with either "-F" or "+F", the extension specified by
iscobol.file.suffix property is appended to the resulting name.
6. Unless the file name starts with either "-F" or "+F", the resulting name is appended to the
iscobol.file.prefix paths.
7. If the resulting name is not an absolute path, it is appended to the working directory specified by the
C$CHDIR routine, if any.
Once the full-name is ready, it’s passed to the file handler.
Some file handlers might perform additional operations on the file name. For example:
JIsam
• If the full-name constructed by isCOBOL is a relative path, the path will be relative to the current working directory.
c-tree
• c-tree automatically appends the .dat extension to the data file name and the .idx extension to the index file name before opening the disc file. These extensions can be configured by
<datafilesuffix> and
<indexfilesuffix> settings in the c-tree configuration.
• If the full-name constructed by isCOBOL is a relative path, the path will be relative to the server working directory (see
SERVER_DIRECTORY and
LOCAL_DIRECTORY for details).
Database Bridge
• Database Bridge converts all hypens and dots to underscore in the full-name before accessing the table.
remote
• if the File Server machine is a different platform than the local PC (e.g. Linux server and Windows client), a full path built on the local PC may not be understood correctly by the server (e.g. Linux can’t interpret "C:" at the beginning of a path), therefore you should set the FILE-PREFIX according to the server platform as the full path will be resolved server side.