Declaring online databases

Before a database can be used in the IMS system, it must be declared. Declare online databases to the IMS control region using the DATABASE macro statement, the CREATE DB command, or optionally, the PGMCREAT user exit.

The IMS control region allows the application program to access the database and provides DL/I call services. To declare online databases:

  1. Define a list of all the physical databases that can be used by the programs by including DATABASE macro statements in the system definition stage 1 input).
  2. Include separate statements for the index and data portions of a HIDAM or PHIDAM database.
  3. Include one statement for each secondary index database that refers to any other database that is defined to the online system.

The name that you use on the DATABASE macro is the same as the name used on the DBD statement, or the member name in IMS.DBDLIB, for the corresponding physical or index database definition. Do not specify logical databases.

The DATABASE macro allows you to specify a performance option for an individual database. Specify RESIDENT to load the control data management block (DMB), which is needed to access the database, from the active IMS.ACBLIBA/B data set into a separate DMB pool at system initialization. The advantage to this option is that these databases do not incur OPEN or CLOSE penalties caused by competition for space in the DMB pool.

The default value of the DATABASE macro ACCESS keyword is exclusive (EX), which specifies that the database is for exclusive use by this online system.

When the PGMCREAT user exit routine dynamically creates an application program, it can optionally specify to create a database.