Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- category: Bryan.Dietz
-- description: Jobs in msgw(wrkactjob)
SELECT Job_Name
,Subsystem
,Function_Type CONCAT '-' CONCAT Function AS "Function"
,Job_Status
,(SELECT Message_Text
FROM TABLE (Qsys2.Joblog_Info(I.Job_Name)) A
ORDER BY Ordinal_Position DESC
FETCH First 1 ROW ONLY) AS Joblog_Info
FROM TABLE ( Qsys2.Active_Job_Info( ) ) I
WHERE
Job_Status = 'MSGW'
and
job_name not like '%/ROBOT%' -- filter out ROBOT jobs that are always in MSGW
ORDER BY Subsystem
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment