Original Message:
Sent: Mon October 30, 2023 01:47 PM
From: Steven Riedmueller
Subject: Checking all systems for MSGW
You could also combine these so that you'll only get back the inquiry messages for jobs that are still sitting in MSGW.
SELECT MESSAGE_ID, MESSAGE_TEXT, MESSAGE_TIMESTAMP, FROM_JOB FROM TABLE ( QSYS2.MESSAGE_QUEUE_INFO(MESSAGE_FILTER => 'INQUIRY') ) JOIN TABLE ( SELECT JOB_NAME FROM TABLE ( QSYS2.ACTIVE_JOB_INFO() ) WHERE JOB_STATUS IN ('MSGW') ) ON JOB_NAME = FROM_JOB;
You could even incorporate QSYS2.QCMDEXC() and dynamically build SNDSMTPEMM commands so that executing the SQL itself will generate the alerts. So many cool ways to accomplish things like this nowadays!
------------------------------
Steven Riedmueller
Certified IBM i Admin
Speaker, Mentor, and Advocate
Original Message:
Sent: Fri October 27, 2023 07:17 AM
From: ace ace
Subject: Checking all systems for MSGW
Nice feature to have.
But rarely is a thing to check "synchronously" or willingly.... so I just let my monitoring system to hit the partition with a query like
SELECT JOB_NAME FROM TABLE(QSYS2.ACTIVE_JOB_INFO()) WHERE JOB_STATUS IN ('MSGW')
and alert the interested parties.
To check messages (but they can have a running job or not, maybe the job with the exception ended... so I just prefer to directly check for job_status) one can use something like
SELECT MESSAGE_ID, MESSAGE_TEXT, MESSAGE_TIMESTAMP
FROM TABLE(QSYS2.MESSAGE_QUEUE_INFO(MESSAGE_FILTER => 'INQUIRY'));
------------------------------
--ft
Original Message:
Sent: Thu October 26, 2023 10:43 AM
From: Robert Berendt
Subject: Checking all systems for MSGW
Let's say you have all your LPARs of IBM i layed out in the new Navigator like the following:
How useful do you find it to be able to click on the following:
And get a screen showing all systems with a message stuck in QSYSOPR like the following:
------------------------------
Robert Berendt IBMChampion
------------------------------