AnsweredAssumed Answered

V9 database - accuracy of HOST_JOBCNT?

Question asked by Jessica_Isaacson_255 on Sep 24, 2015
Latest reply on Sep 25, 2015 by Jessica_Isaacson_255
I have a host that doesn't appear to have anything active, but HOST_JOBCNT is still 1. It seems this isn't a reliable field, but is there another way to get active jobs using SQL (without using EH)? Or anyone know why it might be inaccurate?

SELECT *
FROM eh
WHERE eh_hostdst = 'MY_AGENT' OR eh_hostsrc = 'MY_AGENT'  
(0 results)

SELECT host_jobcnt
FROM host
INNER JOIN oh
ON oh_idnr        = host_oh_idnr
AND oh_name       = 'MY_AGENT'
AND oh_deleteflag = 0
(value is 1)

The following script statement properly returns 0, but I'd prefer SQL for this particular application.
:SET &JOBCNT# = SYS_ACTIVE_COUNT("ANY_ALIVE", "*", "*",,"MY_AGENT")

Thanks in advance for any explanation/advice!

Outcomes