We have some RPG code which will end a job if it has a record lock, but I would like to be sure that the job is not 'active' (not doing anything) before doing so. Is this sort of detail available via an API call ? Any examples would be gratefully received.
Software/Hardware used:
ASKED:
January 27, 2005 8:06 AM
UPDATED:
October 20, 2009 1:11 AM
You can use the QUSRJOBI api documented at: http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qusrjobi.htm to retrieve the Processing unit time used. (This is returned by format JOBI0150.) I would check the time used, then check again after a brief delay and see if the time used has increased. If it has, the job is defintely actively doing something.