This configuration variable lets you set one map at a time, by using FILE-PREFIX as a list of directories, each of which maps to a different database. Note that in this case "database" refers to "collection of tables" rather than distinguishing between, say, DB2 and Microsoft SQL Server.
The syntax of the value of 4GL_DB_MAP is:
directory = database
where directory is matched against the file specification, and database is used when a directory matches. For example, if you have two databases, data01 and data02, and have COBOL programs written that reference data files in /home/dataA and /home/dataB, you can set 4GL_DB_MAP as follows:
4GL-DB-MAP /home/dataA = data01 4GL-DB-MAP /home/dataB = data02
When the run time attempts to open a file with a directory specification of /home/dataA, the Connector uses the table in database data01.
By setting this variable to blank, all maps are reset to nothing, so no mapping is performed.
Currently, this feature is available with the Database Connectors for Microsoft SQL Server interface. Any special instructions are included in the section describing support.
The 4GL_USEDIR_LEVEL variable determines how many levels of directory information to use as part of a table name. 4GL_DB_MAP interacts with 4GL_USEDIR_LEVEL, in the following way: