× 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.



So using:

SELECT SUBSTR(JOB_NAME,1,6) AS JOB_NUMBER,
SUBSTR(JOB_NAME,8,POSSTR(SUBSTR(JOB_NAME,8),'/')-1) AS JOB_USER,
SUBSTR(SUBSTR(JOB_NAME,8),POSSTR(SUBSTR(JOB_NAME,8),'/')+1) AS
JOB_NAME FROM TABLE (QSYS2.ACTIVE_JOB_INFO(SUBSYSTEM_LIST_FILTER =>
'QUSRWRK')) AS X;

Substitute the Halcyon subsystem for QUSRWRK and you have a list of jobs
running. Compare that to what should be running (from a table or other
storage method) and issue messages as needed.

Is this too easy? Why do you want to use TAA tools, adding a dependency to
your project? Don't get me wrong TAA tools are great and I use them when
available at the customer, but we tend away from it when doing system
programming simply to keep dependencies to a minimum.


--
Jim Oberholtzer
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Steinmetz, Paul
Sent: Wednesday, June 13, 2018 10:53 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxx>
Subject: RE: V7R3 - Halcyon Subsystem job monitor - determine which job is
not running

Plan C.
No longer using QHST and CPF1164.

Created a new work file containing each job that runs in the subsystem.
Then using the HALCYON performance subsystem monitor, When it triggers, I
created a HALCYON substitution variable, JOBNOT.
JOBNOT calls my usrpgm, reading work file, which uses TAATOOL CHKACTJOB cmd.
If the job is not running, CHKACTJOB returns TAA9893.
The logic will find and concatenate the job names.
Resulting alert.

PENCOR05 - Not all 50 jobs running for subsystem Interface, ADRINBOGUS,ELECT
not running

Paul


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Steinmetz, Paul
Sent: Tuesday, June 12, 2018 2:29 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: V7R3 - Halcyon Subsystem job monitor - determine which job is
not running

I found another work around.

I found two control files that contain the job name for all the jobs in the
subsystem.

I will create a Halcyon QHST monitor for CPF1164.
Once triggered, I will match the job name from the CPF1164 to the job name
in either of the control files.
If I get a match, send the alert.

Working on the SQL for the match.

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Steinmetz, Paul
Sent: Tuesday, June 12, 2018 1:37 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: V7R3 - Halcyon Subsystem job monitor - determine which job is
not running

https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=121160

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob
Berendt
Sent: Tuesday, June 12, 2018 1:34 PM
To: Midrange Systems Technical Discussion
Subject: RE: V7R3 - Halcyon Subsystem job monitor - determine which job is
not running

Paul,
We're kind of lazy. It helps to get votes if you provide the direct link.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail
to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: "Steinmetz, Paul" <PSteinmetz@xxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'"
<midrange-l@xxxxxxxxxxxx>
Date: 06/12/2018 01:32 PM
Subject: RE: V7R3 - Halcyon Subsystem job monitor - determine which
job is not running
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



I submitted an RFE - Add subsystem name to CPF1164 job ending message.
Please vote for it.

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob
Berendt
Sent: Thursday, June 07, 2018 2:01 PM
To: Midrange Systems Technical Discussion
Subject: Re: V7R3 - Halcyon Subsystem job monitor - determine which job is
not running

Has the subsystem, which was a big concern to the OP.

You gave me an idea though.

Are the jobs still active (if they ever were)?


with cpf1124 as (
SELECT
MESSAGE_ID, -- The message ID for this message.
FROM_JOB, -- The qualified job name when the message was sent.
MESSAGE_TOKENS, -- The message token string. If the value is longer
than 4096 characters, it will be truncated with no warning.
MESSAGE_TEXT, -- The first level text of the message including
tokens, or the impromptu message text.
MESSAGE_SECOND_LEVEL_TEXT -- The second level text of the message
including tokens.
FROM TABLE (QSYS2.HISTORY_LOG_INFO(-- START_TIME => CURRENT DATE
)) AS X
Where x.message_id='CPF1124'
and x.message_text like '%QINTER%'
ORDER BY ORDINAL_POSITION desc),
cpf1164 as (
SELECT
MESSAGE_ID, -- The message ID for this message.
FROM_JOB, -- The qualified job name when the message was sent.
MESSAGE_TOKENS, -- The message token string. If the value is longer
than 4096 characters, it will be truncated with no warning.
MESSAGE_TEXT, -- The first level text of the message including
tokens, or the impromptu message text.
MESSAGE_SECOND_LEVEL_TEXT -- The second level text of the message
including tokens.
FROM TABLE (QSYS2.HISTORY_LOG_INFO(-- START_TIME => CURRENT DATE
)) AS X
Where x.message_id='CPF1164'
ORDER BY ORDINAL_POSITION desc)
select cpf1124.from_job from cpf1124
where cpf1124.from_job not in (
select cpf1164.from_job from cpf1164)
;

If the job ain't in this list then freak out!
Of course there are active job services which may work equally as well.
Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.