-----Original Message-----
From: Michael Mayer
Sent: Friday, September 13, 2024 12:21 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: How to see who has signed onto an IBM i and what they are.

I have this SQL that me and our developers use on a daily basis to see who has answered messages on our systems. What date/time, the actual message and the response. It runs on 5250 or ACS SQL (my preferred method and is pretty quick. It can be run for a single day or a range of days.

Perhaps it can be modified for the purpose you want. Not sure but thought I'd throw it out there.
It may be a starting point and if not, you have something to use as it is.

This is it ... sorry if the email before this one got cut off on the SQL.
--------------------------------------------------------------------------------------------------------

--- QSYSOPR System Messages ---
--- Who answered the message? ---
--- Columns prefixed with the "A" come from the error result, and those "B" from the reply result. ---

SELECT A.MESSAGE_TIMESTAMP AS "Date/Time of Error Msg",
A.MESSAGE_ID AS "Msg ID",
A.FROM_JOB AS "Job Generated Error Msg",
A.MESSAGE_TEXT AS "Msg Text",
B.MESSAGE_TIMESTAMP AS "Reply Date/Time",
SUBSTR(B.MESSAGE_TEXT, 1, 10) AS "Reply",
A.FROM_USER AS "Reply by"
FROM TABLE (QSYS2.MESSAGE_QUEUE_INFO(QUEUE_LIBRARY => 'QSYS',
QUEUE_NAME => 'QSYSOPR',
SEVERITY_FILTER => 99)) A,
LATERAL (SELECT MESSAGE_TIMESTAMP,
MESSAGE_TEXT, FROM_USER
FROM TABLE (QSYS2.MESSAGE_QUEUE_INFO(QUEUE_LIBRARY => 'QSYS',
QUEUE_NAME => 'QSYSOPR',
SEVERITY_FILTER => 99))

--- Single Date
--- WHERE CHAR(A.MESSAGE_TIMESTAMP) LIKE '%2024-01-15%'
--- AND ASSOCIATED_MESSAGE_KEY = A.MESSAGE_KEY) B

--- Range of Dates
WHERE CHAR(A.MESSAGE_TIMESTAMP) >= '2024-09-01' AND
CHAR(A.MESSAGE_TIMESTAMP) <= '2024-09-13'
AND ASSOCIATED_MESSAGE_KEY = A.MESSAGE_KEY) B

ORDER BY "Date/Time of Error Msg" ASC

--------------------------------------------------------------

Respectfully,
Michael Mayer
IBM i on Power System Admin / VMO Specialist ERMCO-ECI
2225 Industrial Rd
Dyersburg, Tennessee 38024
Cell, Office and Text Messages: 518.641.8906
Email: michael.mayer@xxxxxxxxxxxxx
https://www.ermco-eci.com
https://ermcopower.com/
IBM i Award Winning Personal Blog Site: https://ibmireference.blogspot.com
Awarded IBM 2024 Advocate, Contributor, Influencer and IBM i Ready Badges.

Today's Topics:

1. How to see who has signed onto an IBM i and what they are
doing afterwards? (Thomas Burrows)
2. Re: How to see who has signed onto an IBM i and what they are
doing afterwards? (James H. H. Lampert via MIDRANGE-L)
3. Re: How to see who has signed onto an IBM i and what they are
doing afterwards? (Thomas Burrows)


----------------------------------------------------------------------

message: 1
date: Fri, 13 Sep 2024 12:40:01 -0400
from: Thomas Burrows <thomas.burrows.1957@xxxxxxxxx>
subject: How to see who has signed onto an IBM i and what they are
doing afterwards?

Is there a way to see who has signed onto an IBM i and what they are doing afterwards?

Maybe some history files out there somewhere?

Thomas in Texas


------------------------------

message: 2
date: Fri, 13 Sep 2024 09:42:38 -0700
from: "James H. H. Lampert via MIDRANGE-L"
<midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: How to see who has signed onto an IBM i and what they are
doing afterwards?

On 9/13/24 9:40 AM, Thomas Burrows wrote:
Is there a way to see who has signed onto an IBM i and what they are
doing afterwards?

Maybe some history files out there somewhere?

Maybe do a DSPLOG? That will at least tell you when jobs started and ended, and under what user.

--
JHHL



------------------------------

message: 3
date: Fri, 13 Sep 2024 12:44:32 -0400
from: Thomas Burrows <thomas.burrows.1957@xxxxxxxxx>
subject: Re: How to see who has signed onto an IBM i and what they are
doing afterwards?

Does not DSPLOG only show for the user that you are signed on as??

Thank you for the quick response.

On Fri, Sep 13, 2024 at 12:43?PM James H. H. Lampert via MIDRANGE-L < midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

On 9/13/24 9:40 AM, Thomas Burrows wrote:
Is there a way to see who has signed onto an IBM i and what they are
doing
afterwards?

Maybe some history files out there somewhere?

Maybe do a DSPLOG? That will at least tell you when jobs started and
ended, and under what user.

--
JHHL


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.