Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Good morning. I have to write a process that will be scheduled and it will check whether or not three specific jobs are active. Is there a simplier way of retrieving this information then somehow using the QUSLJOB API?
if (isJobActive( theJob ) ); // Is the job active, then continue.
In COZTOOLS, the above function does that for you, but it uses the API you mentioned.
If you don't have COZTOOLS and don't want to write something yourself, you could try this in SQL:
select * from table(qsys2.active_job_info('NO','','ADMIN','')) a
Where ADMIN is the name of the job you want to include in the resultset.
Parameters: