|
You may want to consider setting up job accounting. Job activity is then stored in a journal receiver and can easily be dumped into a DB file for querying. Kenneth -----Original Message----- From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx] Sent: Tuesday, July 08, 2003 9:52 PM To: Midrange Systems Technical Discussion Subject: Re: Logging user activity On Tue, 8 Jul 2003, Kevin Russell wrote: > > On an AS400 v4r2, I need to keep a record of users logging in and > logging out and then be able to query that information into a monthly > report. How can I do this or what ibm publication should I read to > accomplish this? > This is how I do it: 1) I have a data queue registered with the Job Notification Exit Point. 2) I have a never-ending-program that reads entries from that data queue containing notifications of jobs starting and ending. 3) When the data queue entry indicates that a job is STARTING, I call the Retrieve Job Information API to find out if it's an interactive job or not. I only log interactive jobs. Then, I write the job information, including the current date & time to a PF. 4) When the data queue entry indicates that a job is ENDING, I chain back to the record in my PF from when it started. If there's a record there, I put the current date & time into the "date/time logged off" fields of my PF. The documentation for the exit point and the retrieve job info API are in the V4R2 Work Management APIs manual found here: http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AM701/CCONTENTS?DT=19 980812102100&SHELF=QB3AYC01&DN=SC41-5878-01 (if that link is too long, you may need to copy/paste it into your browser window) Good Luck... _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.