Start of change

End Database Monitor (ENDDBMON) command

The End Database Monitor (ENDDBMON) command ends the collection of database performance statistics for a specified job, all jobs on the system or a selected set of jobs (for example, a generic job name).

To end a monitor, you can specify the job or the monitor ID or both. If only the JOB parameter is specified, the monitor that was started using the same exact JOB parameter is ended - if there is only one monitor which matches the specified JOB. If more than one monitor is active which matches the specified JOB, then the user uniquely identifies which monitor is to be ended by use of the MONID parameter. When only the MONID parameter is specified, the specified MONID is compared to the monitor ID of the monitor for the current job and to the monitor ID of all active public monitors (monitors that are open across multiple jobs). The monitor matching the specified MONID is ended.

The monitor ID is returned in the informational message CPI436A. This message is generated for each occurrence of the STRDBMON command. Look in the joblog for message CPI436A to find the system generated monitor ID, if needed. The monitor ID can also be found in column QQC101 of the QQQ3018 database monitor record.

Restrictions

When monitoring is ended for all jobs, all of the jobs on the server will be triggered to close the database monitor output table. However, the ENDDBMON command can complete before all of the monitored jobs have written their final statistic records to the log. Use the Work with Object Locks (WRKOBJLCK) command to determine that all of the monitored jobs no longer hold locks on the database monitor output table before assuming the monitoring is complete.

Example 1: End Monitoring for a Specific Job

ENDDBMON   JOB(*)

This command ends database monitoring for the current job.

Example 2: End Monitoring for All Jobs

ENDDBMON   JOB(*ALL)

This command ends the monitor open across all jobs on the system. If more than one monitor with JOB(*ALL) is active, then the MONID parameter must also be specified to uniquely identify which specific public monitor to end.

Example 3: End Monitoring for an Individual Public Monitor with MONID Parameter

ENDDBMON   JOB(*ALL) MONID(061601001)

This command ends the monitor that was started with JOB(*ALL) and that has a monitor ID of 061601001. Because there were multiple monitors started with JOB(*ALL), the monitor ID must be specified to uniquely identify which monitor that was started with JOB(*ALL) is to be ended.

Example 4: End Monitoring for an Individual Public Monitor with MONID Parameter

ENDDBMON   MONID(061601001)

This command performs the same function as the previous example. It ends the monitor that was started with JOB(*ALL) or JOB(*) and that has a monitor ID of 061601001.

Example 5: End Monitoring for All JOB(*ALL) Monitors

ENDDBMON   JOB(*ALL/*ALL/*ALL) MONID(*ALL)

This command ends all monitors that are active across multiple jobs. It will not end any monitors open for a specific job or the current job.

Example 6: End Monitoring for a Generic Job

ENDDBMON   JOB(QZDA*)

This command ends the monitor that was started with JOB(QZDA*). If more than one monitor with JOB(QZDA*) is active, then the MONID parameter must also be specified to uniquely identify which individual monitor to end.

Example 7: End Monitoring for an Individual Monitor with a Generic Job

ENDDBMON   JOB(QZDA*) MONID(061601001)

This command ends the monitor that was started with JOB(QZDA*) and has a monitor ID of 061601001. Because there were multiple monitors started with JOB(QZDA*), the monitor ID must be specified to uniquely identify which JOB(QZDA*) monitor is to be ended.

Example 8: End Monitoring for a Group of Generic Jobs

ENDDBMON   JOB(QZDA*) MONID(*ALL)

This command ends all monitors that were started with JOB(QZDA*).

Related information
End Database Monitor (ENDDBMON) command
End of change