Specifying a Mapping in a File Definition |
Virtual Machine |
To use logical database name mapping in your applications, you need to specify a logical database name in the Physical File field of the File Definition screen.
There are four built-in logical database names that may be mapped. The names are used to locate PROIV files:
Built-in Logical Database Names:
Database Name |
Use |
PRODATA |
The default logical database name. The directory path for any PROISAM, DEFAULT, or DECRMS data files that do not have a logical database, or a complete path name specified in it’s alternate file name definition. If not mapped, PROIVDEFAULT is used. |
PROIVDEFAULT |
The default logical database name for any file that is not specified in some other way. If not defined, the current directory is used. |
PROIVTEMP |
The logical database name for scratch files created and deleted during PROIV execution. In particular, the files used for sorting. On a network, it may be desirable for these files to be located on a different machine. If not defined, the PROIVDEFAULT directory is used. |
PROPATH |
The default logical database name for the PROIV bootstrap files. If not defined, PROIVDEFAULT is used. All of the built-in logical database names can be defined in the initialisation file. The values described above are defaults and are in effect if the built-in file name is not explicitly defined. |
If a logical database name entry is not found in the initialisation file, PROIV looks to the default environment variable PRODATA and then PROPATH to locate the logical name. If, after looking at the environment variables, a logical name is still not found, PROIV looks in the current directory for the files.
Alternate File Name Format
In the File Definition screen’s Physical File field, enter the alternate file name in the following format:
{%LOGICAL_DATABASE_NAME%}{pathname}{filename}
Where:
LOGICAL_DATABASE_NAME
Optional and is the logical name to be mapped to a physical location. The logical path name must be surrounded by percent signs. The actual filename cannot be part of the logical name. The two must be separate, although they may be concatenated. That is, the logical name in the initialisation file (.INI) cannot include the file name (logical or physical). It only refers to the path.
For example, if the File Definition screen has a file name of ‘prodata.pro’, the Alternate file name of ‘%SALES%’, and the location of SALES is defined in the initialisation file as ‘xyz/123’, PROIV automatically concatenates the filename to the alternate filename and the file is resolved as ‘xyz/123/prodata.pro’. Note: You may still assign a literal alternate file name at the end of the logical path name.
For example, ‘%SALES%test.pro’ is legitimate.) Note that when the logical name is concatenated with the physical file name, there is no slash separating the two. PROIV resolves the slash on its own.
The maximum characters allowed for a logical database name is twenty (20) characters. Logical database names are not case sensitive, and all references to database names are automatically converted to uppercase when PROIV attempts to access the .INI file. For example, the following two logical names are equivalent when accessed from PROIV:
%SALES%custdata.pro
%SaLes%custDATA.pro
Logical names can use alphabetic, numeric and underscore characters. They may not use a percent sign.
pathname/filename
Optional and is the actual physical name of the file in the directory specified by LOGICAL_DATABASE_NAME. At PROIV start-up, no check is made to determine if the physical path names for the database(s) exist. If the defined database(s) do not exist, an error is issued when the attempted access fails.
Topic ID: 720223