RATE THIS ANSWER
+1
Click to Vote:
1
0
wrkActJob Status DSPW display waiting - at this instant the job is waiting for response from screen
Option 5 work with job
option 11 call stack - if F5 doesn't show a different statement number job may be idling
optin 14 display open files
F11 Display I/O details
F5 - refresh
if I/O count and relative record don't change job may be idling
option 3 Job run attributes
CPU time used shouldn't be increasing or is increasing very slowly
------------------------------------------------------------------------------
An alternative, and automated, approach would be to use the Retrieve Job Information API QUSRJOBI. Format JOBI0200 provides the Number of interactive transactions and the Processing unit time used by the job. You could periodically (every 15 minutes?) have a program wake up and retrieve this information about the specific job of interest. This job would compare the current Number of interactive transactions to the last Number of interactive transactions and, if the same, then compare the current Processing time used to the last Processing time used. If the same, end the job. If not the same, move current to last for both values and go back to sleep.
If you are interested not so much with a specific job but any interactive job, then you could also use the List Job API QUSLJOB to get a listing of every interactive job on the system. Using this list you could then have the same logic applied to each job.
In addition to the above you may want to consider a few other items (all of which can be done within a program). Some that come to mind are:
1. Is the job in a message wait condition with the message on another queue?
2. Has the user used system request to start a secondary job and the user is active in the other job?
Obviously there is a risk involved in terminating jobs after any fixed length of time. With phone calls I have certainly been known to leave an active transaction in process for the length of the call and whatever work came out of the call. Perhaps though you're thinking of doing this type of operation after normal business hours.
Bruce Vining (who has written many programs of this nature in the past)
Bruce Vining Services Try wrksysact and press F19
Last Answered:
Nov 21 2008 2:20 PM GMT by Tamira 
95 pts.