Previous Topic: ParametersNext Topic: Examples


Usage

Identify Database Name Table in DMCL

To use the database name table at runtime, you must associate the database name table with the DMCL used at run time.

DBTABLE Mappings Identify Database Names

The primary function of the DBTABLE mappings specified on the DBTABLE statement is to identify the database name to access when none is provided on a BIND RUN-UNIT statement. The subschema mappings are searched for a match on the subschema name passed on the bind. The first subschema mapping with a matching ssc-name-1 determines the database name to be accessed.

The DBTABLE mappings can also be used if the definition of the database name provided on the bind contains a subschema mapping with the USES DBTABLE MAPPING clause. This clause directs CA IDMS/DB to ignore the database name provided on the bind and to select another database name by using the DBTABLE mappings.

Using Wildcards for Mapping Subschemas

When you specify a subschema name, you can use a question mark (?) to indicate any character. Each question mark in ssc-name-1 will match any character in the corresponding position of a subschema name passed on the BIND RUN-UNIT statement. For example, an ssc-name-1 of EMP??T? will match all 7-character subschema names beginning with EMP and having a "T" as the sixth character.

Each question mark in ssc-name-2 will preserve the character in the corresponding position of the subschema name passed on the BIND. For example, an ssc-name-2 of EMP??P? will replace the first three characters and the sixth character of the subschema name passed on the bind statement with "EMP" and "P" respectively. The remaining characters of the subschema name remain unchanged. If ssc-name-2 is ????????, the subschema name passed on the bind statement remains unchanged.

Mapping Sequence Is Important if Using Wildcards

DBTABLE mappings are searched from top to bottom until a match is found on ssc-name-1. Therefore, you should list the most specific mapping first and the least specific mapping last. For example:

add subschema emp????? maps to emp????? dbname empdb
 .
 .
 .
add subschema ???????? maps to ???????? dbname defdb

Generate Creates a Database Name Table Load Module

The GENERATE DBTABLE statement creates and stores a database name table load module. To make a database name table available to CA IDMS/DB you must punch the load module as an object deck and link edit it into the appropriate load library.

To punch a database name table load module as an object deck, use the PUNCH DBTABLE LOAD MODULE utility statement.

Regenerate the Database Name Table Following Changes

You must regenerate the database name table following any additions, changes, or deletions by issuing a GENERATE DBTABLE statement.

Defining the Default Dictionary

One of the primary functions of a database name table is to identify the default dictionary. A default dictionary is the dictionary accessed when you don't specify a dictionary explicitly. It is defined as the database name to which the IDMSNWKL subschema maps. Typically, it is specified using a subschema mapping statement such as:

subschema idmsnwk? maps to idmsnwk? dbname defdict

You must define a default dictionary in every database name table you create.