×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
QSYS2.JOB_INFO UDTF.... That's the one I was looking for and missed!
Thanks, Rob.
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> on behalf of Rob Berendt <rob@xxxxxxxxx>
Sent: Tuesday, April 18, 2017 8:12 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: Joblogs for jobs in jobq: Not sure this is the right group, but if not I am sure Mr Gibbs will point me to the right one.
SELECT X.JOB_NAME, msg_timestamp, msg_text,
'ENDJOB JOB(' concat x.job_name concat ') LOGLMT(0)' as cmdtxt
FROM TABLE(QSYS2.JOB_INFO(JOB_STATUS_FILTER => '*JOBQ',
JOB_USER_FILTER => '*ALL')) X
,lateral (select y.message_timestamp
from table(qsys2.joblog_info(x.job_name)) y
where y.message_text like '%ERPCSTROL1DARREN%') L1 (msg_timestamp)
,lateral (select y.message_text
from table(qsys2.joblog_info(x.job_name)) y
where y.message_text like '%ERPCSTROL1DARREN%') L2 (msg_text)
WHERE JOB_QUEUE_LIBRARY = 'ERPLXEC'
AND JOB_QUEUE_NAME = 'BPCSJOBQ'
;
Doesn't really end the job, just shows you the command you would use to
end the job.
Now, if you then want to pass that command into your own QCMDEXC function
that's up to you...
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.