Dynamically

By using the RESMGR macro, an authorized routine can dynamically add (or delete) a resource manager. If you want to provide a routine that disposes of your address space and task resources in a particular way, use RESMGR to add the routine to the system. When you use RESMGR, the routine that you add takes effect immediately and before the next IPL of the system. Use RESMGR to delete the routine when it is no longer required.

The resource manager that you add can be one that monitors the termination of one or more address spaces, or one or more tasks. The following rules apply before you can issue RESMGR to provide a resource manager:
  • To monitor a single task in the home address space, that task must exist.
    Note: To monitor for several tasks, issue RESMGR for each task.
  • To monitor all tasks Start of changeor the jobstep program taskEnd of change in the home address space, that address space must exist, but a particular task need not exist.
  • To monitor all tasks Start of changeor the jobstep program taskEnd of change in all address spaces, a particular address space or task need not exist.
  • To monitor a single address space, that address space must exist.
  • To monitor all address spaces, a particular address space need not exist.
The system automatically deletes the resource manager if it is monitoring the termination of the following:
  • A specific task, when the task terminates
  • A specific address space, when the address space terminates
  • All tasks Start of changeor the jobstep program taskEnd of change in a specific address space, when the address space terminates
The system does not automatically delete the resource manager if it is monitoring termination of the following (the resource manager stays in the system to monitor for the next termination):
  • All tasks Start of changeor the jobstep program taskEnd of change in all address spaces
  • All address spaces

Whether or not the system is to automatically delete the resource manager, you can invoke the delete service of RESMGR at any time to force the deletion of the resource manager.

For a description of the RESMGR macro, see z/OS MVS Programming: Authorized Assembler Services Reference LLA-SDU.