Jim, You need to be at V5R1 to use QUSRJOBI to get CPU%. And you need to 
use the QUSLJOB API first, to get a list of active jobs. Then you loop 
through the list, using the QUSRJOBI API.
But the Open list of jobs API (QGYOLJOB) can give you this info in one shot 
- it returns a list of entries, and you can say that you want this 
information only. This API has been around since V3R7, but the CPU% info 
has only been available, too, since V5R1.
QUSLJOB uses a user space, and there are programs that will help you 
navigate through it. See the API Programming manual if you've not done this 
before.
QUSRJOBI uses a structure to return the data for the job specified. In CL 
you need to declare a variable of the length of that structure (look at 
QSYSINC/H, member QUSRJOBI for the fields you need - add up the lengths). 
Then you need to substring the return variable to get the info you want. 
The JOBI1000 format has CPU% over a certain elapsed - this is new in V5R1. 
There's a reset parameter used with that format.
At 10:12 AM 1/30/2003 -0600, you wrote:
I am looking for an API or a way to submit a job to monitor for any jobs
that are using over 50, 60 or more % of the system and/or a job that has
been running for over 45 minutes.  Is anyone using the QUSRJOBI in a CL, if
so could I see an example of your code?  If anyone is doing what we are
trying to do, could I see the code to do it?  I am not looking to buy any
software or utility.  I have searched the archives for something, that is
where I got the API QUSRJOBI from.  Any help would be greatly appreciated.
TIA
Jim
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 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.