Maintaining global information for databases, DEDB areas, and transactions
IMS uses the RM resource structure to maintain command status for databases, DEDB areas, and transactions across an IMSplex. This global status enables all IMS systems to view databases, DEDB areas, and transactions in an IMSplex as single databases, areas, and transactions.
If an IMS system restarts, it uses any global command status that is set in RM and applies that status to its resources, if necessary.
The status of global resources is maintained for most databases whether or not they are registered to DBRC, for DEDB areas, and for transactions. Database status is not maintained for shared secondary index databases and MSDBs.
If an error occurs when RM obtains database or DEDB area status, the global status is not maintained for that resource, and message DFS3308E is issued. DFS3308E lists the RM error return and reason code, followed by message DFS3500I, which indicates that global status for database or DEDB area resources is disabled. All subsequent DB or AREA commands with SCOPE(ALL) or GLOBAL prevent RM status from being updated. After the error is corrected, you can issue UPD IMS SET to enable global status again.
After an online change is committed, global status is obtained for all databases, DEDB areas, or transactions being added. Global command status for CREATE DB and CREATE TRAN commands is also obtained from RM. The databases, DEDB areas, or transactions cannot be used until global status for the resources added is obtained and processed. If an error occurs obtaining or processing the global status for the added resources, the added resources are marked in error.
To maintain global status for databases, DEDB areas, and transactions in RM, specify the appropriate PLEXPARM value during IMS initialization in either the DFSDFxxx or DFSCGxxx IMS PROCLIB member data set.
The status of global resources is set by the first IMS system that starts in an IMSplex, and the values are obtained from the PLEXPARM parameters on that system. By maintaining this information globally using RM, you can, for example, stop a database globally, and any IMS system that joins the IMSplex recognizes that the database is stopped. Similarly, an IMS system joining the IMSplex can be prevented from accessing or updating a database that is in use by an offline process.
Only the last significant global status is maintained in the RM structure for the databases, DEDB areas and transaction resources. If multiple update commands are issued for a resource, only the most recent command status is maintained and available to be queried as the global status. For example, if an UPD TRAN NAME(TRANA) STOP(SCHD) command is issued, the global status of STOSCHD is maintained for transaction TRANA. If, an UPDATE TRAN NAME(TRANA) STOP(Q) command is then issued, the global status of STOQ is maintained for transaction TRANA. To maintain both the STOSCHD and STOQ status, an UPDATE TRAN NAME(TRANA) STOP(Q,SHCD) command must be issued.
You can also change the PLEXPARMs dynamically using the UPD IMS SET (PLEXPARM()) command. See IMS Version 15 Commands, Volume 2: IMS Commands N-V for information about the UPD IMS command.
RM works with CQS to access the resource structure for the client. RM issues the requests to query and maintain the resources, and it notifies the client if there is a resource structure change that affects the client.
The IMS systems in the IMSplex still contain the resource definitions. RM does not ensure resource definition consistency across the IMSplex. You can use global online change to update the resource definitions in the IMS systems.
The following table shows how IMS obtains and updates global status for resources, based on how IMS is started:
Type of start | How status is obtained and updated |
---|---|
IMS initialization | IMS reads the PLEXPARM values from RM to determine whether the RM value takes precedence, or the IMS definition value should be used. IMS updates the PLEXPARM values in RM for other IMS systems that subsequently come up. If RM global status is maintained, IMS obtains global status of databases, DEDB areas, and transactions from RM's resource structure. |
Cold start or /ERE COLDBASE or /ERE COLDSYS command | Global status of databases, DEDB areas, and transactions is obtained from RM's resource structure. |
Warm start and emergency restart | Local status from log records is applied first. After log record processing completes, if IMS determines that the global status that it read from RM was updated while the IMS system was down, the RM global status that was read from RM is applied to the resource. |
Information stored for databases resources
The information that RM maintains for databases includes:
- Database names
- Database types
- Database access type
- HALDB master name if the database is a HALDB partition
- Database status
The commands and system actions that cause global status to be updated for databases include:
- /DBDUMP DB with the GLOBAL keyword
- /DBRECOVERY DB with the GLOBAL keyword
- /START DB with the GLOBAL keyword
- /STOP DB with the GLOBAL keyword
- UPDATE DB with any of the following keywords specified: START(ACCESS) SET(ACCTYP) STOP(ACCESS | SCHD | UPDATES) SET(LOCK(ON|OFF)) and SCOPE=ALL
Global database information is deleted from the RM structure using the UPD IMS SET(PLEXPARM(GSTSDB(N))) command.
Information stored for DEDB area resources
The information that RM maintains for DEDB areas includes:
- DEDB names
- DEDB area access
- DEDB area names
- DEDB area status
The commands and system actions that cause global status to be updated for DEDB areas include:
- /DBRECOVERY AREA with the GLOBAL keyword
- /START AREA with the GLOBAL keyword
- /STOP AREA with the GLOBAL keyword
- UPDATE AREA with any of the following keywords specified START(ACCESS) SET(ACCTYPE) STOP(ACCESS | SCHD) and SCOPE=ALL
Global DEDB area information is deleted from the RM structure using the UPD IMS SET(PLEXPARM(GSTSAREA(N))) command.
Information stored for transaction resources
The information that RM maintains for transactions includes the transaction name and the transaction status.
The commands and system actions that cause global status to be updated for transactions include:
- UPD TRAN STOP(Q) SCOPE=ALL
- UPD TRAN STOP(SCHD) SCOPE=ALL
- UPD TRAN START(Q) SCOPE=ALL
- UPD TRAN START(SCHD) SCOPE=ALL
To reset global status to NULL, issue the UPD IMS SET(PLEXPARM(GSTSTRAN=N)) command.