Hi Wolfgang,
Thanks for the suggestion. I tried at my end, and...
Unfortunately#1 for JPWs the field HOST_SMDISPLAYNAME is empty.
I do not have this issue under 12.2 w/ PostGre. Maybe it's version-related ?
Unfortunately#2 for JPWs the field AH_PROCESSID does not have leading zeros to the Process number, all other types do haveleading zeros.
You can overcome this with LPAD - format the output so it also contains leading zeros.
Unfortunately#3 for CPs the field AH_INFO is empty.
True, but AH_Name on the other hand, contains the desired information.
I did a few adjustments to your query:
SELECT HOST_SMDISPLAYNAME,AH_Name, HOST.HOST_HOSTATTRTYPE, lpad (AH_ProcessID, 10,'0') PROCESS_ID
from dbo.ah, dbo.HOST
where ah_otype = 'SERV'
and ah_timestamp4 is null
and ah_oh_idnr = host_oh_idnr;
And here are the results :
Tested on PostGre, the syntax might be different on MS SQL / DB2 / Oracle.
Hope this helps.
Best regards,
Antoine