On 01-Aug-2016 09:04 -0500, Tim Bronski wrote:
One of our server processes reports when it has been ended and tries
to determine and report the user that ended it. It does this by
trapping SIGTERM and then looking at the *EXT message Q for CPC1126.
This message has the user name that did the end job.
The problem is that this message isn't sent when the subsystem is
ended (which also triggers SIGTERM and ends the job). Then we just
get CPC1206 that has no info. Is there any API that will give me the
information on who initiated the ENDSBS?

The details can be found in the *SYSOPR [QSYSOPR] message queue, and [because all messages sent to *SYSOPR are also sent to the QHST message queue then also in the History Log, and possibly [though doubtful both per the likely job status and no recollection of a similar message] in the joblog of the subsystem [monitor] job that was ended.

For either of the first two noted above, the message CPF0995 "Subsystem &1 ending in progress." identifies that "The End Subsystem (ENDSBS) command was requested from job &4/&3/&2 by user &5."

Receive Nonprogram Message (QMHRCVM) API
"The Receive Nonprogram Message (QMHRCVM) API receives a message from a nonprogram message queue. …"

Open List of History Log Messages (QMHOLHST) API
"The Open List of History Log Messages (QMHOLHST) API provides information about messages that were sent to the QHST message queue. …"

List Job Log Messages (QMHLJOBL) API
"The List Job Log Messages (QMHLJOBL) API lists messages sent to the job message queue of a job. …
An alternative to making multiple calls to QMHLJOBL to list all of the messages is to change to use the Open List of Job Log Messages (QGYOLJBL) API. …"

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].