How IMS systems share databases

This topic describes how database access is established, data sharing at both the block and database level, and how data access is controlled by each level of sharing.

Establishing database access

To specify how an IMS system that is requesting access to a database plans to use the database, use the ACCESS keyword parameter in the DATABASE macro.

You use the ACCESS keyword in the /START command to show how the IMS system requesting access to a database plans to use the database. The presence of any update intent means the whole system requires update access for that database. If any database PCB requires exclusive use, the whole system requires update access for that database. If no updating application programs need update access, you must find out what kind of read access is required. If the online system is to use block-level sharing, you usually declare read access.

The access mode can be update (UP), exclusive (EX), read (RD), or read-only (RO).

If the IMS system requires exclusive use of a database, it can declare its access as exclusive. With exclusive access, the IMS system can insert, delete, replace, or perform a combination of these actions. Exclusive access, therefore, precludes data sharing in block-level or database-level configurations.

If the IMS system needs to insert, delete, replace, or perform a combination of these actions and must participate in data sharing, it can declare its access as update.

IMS systems that plan to read from a database, but not update the database, can use either read or read-only access. With read access, the IMS system can access the data with the assurance that any pending changes have been committed by the application program that requested the change.

With read-only access, the IMS system is allowed to read uncommitted data.
Important: Using read-only access is not recommended for a production environment.

How you specify database access for an IMS system depends on whether you are running a batch or online system.

If you plan to use the online version of the Database Image Copy utility, you do not need to specify ACCESS=UP. Although the utility requires a somewhat limited access while it is creating an image data set, the access and authorization are managed by DBRC.

Declaring database access for IMS batch systems

For an IMS batch system, the database access directly corresponds to the highest PROCOPT value specified in the application program's PCBs or SENSEG statements. For example, if one PCB has PROCOPT set to G, and another PCB for the same database has PROCOPT set to I, the value of I is used; that is, the access for that database is update.

Declaring and changing database access for online systems

For an online IMS, you specify access with the ACCESS keyword in the DATABASE macro during system definition. The access is declared for each individual database and reflects a desired access suitable for all the application programs that might be scheduled against that database.

Related reading: For a detailed description of the ACCESS keyword, see IMS Version 15.5 System Definition.

To dynamically change how an online IMS system accesses an individual database, use the /START command, which is described in IMS Version 15.5 Commands, Volume 2: IMS Commands N-V.