Disconnecting from IMS
The connection between IMS and Db2 ends when either IMS or Db2 terminates. Alternatively, the IMS master terminal operator (MTO) can explicitly break the connection.
About this task
To break the connection, enter this command:
/STOP SUBSYS subsystem-name
That command sends the following message to the terminal that entered it, usually the master terminal operator (MTO):
DFS058I STOP COMMAND IN PROGRESS
The /START SUBSYS subsystem-name command is required to re-establish the connection.
In an implicit or explicit disconnect, the following message is sent to the IMS master terminal operator (MTO):
DSNM002I IMS/TM imsid DISCONNECTED FROM SUBSYSTEM subsystem-name - RC=z
That message uses the following reason codes (RC):
- Code
- Meaning
- A
- IMS is terminating normally (for example, /CHE FREEZE|DUMPQ|PURGE). Connected threads complete.
- B
- IMS is terminating abnormally. Connected threads are rolled back. Db2 data is backed out now; DL/I data is backed out at IMS restart.
- C
- Db2 is terminating normally after a STOP DB2 MODE (QUIESCE) command. Connected threads complete.
- D
- Db2 is terminating normally after a STOP DB2 MODE (FORCE) command, or Db2 is terminating abnormally. Connected threads are rolled back. DL/I data is backed out now. Db2 data is backed out now if Db2 terminated normally; otherwise, it is backed out at restart.
- E
- IMS is ending the connection because of a /STOP SUBSYS subsystem-name command. Connected threads complete.
If an application attempts to access Db2 after the connection ended and before a thread is established, the attempt is handled according to the region error option specification (R, Q, or A).