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



I'm confused as to why everyone is looking for a message in the log. Why
not:

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?


--
Jim Oberholtzer
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob
Berendt
Sent: Thursday, June 07, 2018 1:01 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
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
--
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: "Vernon Hamberg" <vhamberg@xxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date: 06/07/2018 01:04 PM
Subject: Re: V7R3 - Halcyon Subsystem job monitor - determine which
job is not running
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Rob, did you try the history log info and specify CPF1124? That message
also has a bunch of info that isn't show, same way as CPF1164.

Vern

On 6/7/2018 11:18 AM, Rob Berendt wrote:

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqudfhisto
ryloginfo.htm


I don't see it in there either.
SELECT
ORDINAL_POSITION, -- A unique number for each row that indicates the
time order of messages in the job log.
MESSAGE_ID, -- The message ID for this message.
MESSAGE_TYPE, -- Type of message.
MESSAGE_SUBTYPE, -- Subtype of message.
SEVERITY, -- The severity assigned to the message.
MESSAGE_TIMESTAMP, -- The timestamp when the message was sent.
FROM_USER, -- The current user of the job when the message was
sent.
FROM_JOB, -- The qualified job name when the message was sent.
FROM_PROGRAM, -- The program that sent the message.
MESSAGE_LIBRARY, -- The name of the library containing the message
file.
MESSAGE_FILE, -- The message file containing the message.
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.
-- SYSLOG_EVENT, -- The Common Event Format (CEF) syslog event for
the message preceded by a header of the requested type.
-- SYSLOG_FACILITY, -- The syslog facility assigned to the event.
-- SYSLOG_SEVERITY -- The syslog severity assigned to the event.
-- SYSLOG_PRIORITY -- The syslog priority number assigned to the
event.
FROM TABLE (QSYS2.HISTORY_LOG_INFO(-- START_TIME => CURRENT DATE
)) AS X
Where message_id='CPF1164'
ORDER BY ORDINAL_POSITION desc;


Then again, if one wasn't so stuck in the rut of insisting that all
joblogs go to spool files there's always this:
Select
ORDINAL_POSITION, -- A unique number for each row that indicates the
time order of messages in the job log.
MESSAGE_ID, -- The message ID for this message.
MESSAGE_TYPE, -- Type of message.
MESSAGE_SUBTYPE, -- Subtype of message.
SEVERITY, -- The severity assigned to the message.
MESSAGE_TIMESTAMP, -- The timestamp for when the message was issued.
FROM_LIBRARY, -- The library containing the program or service
program that sent the message.
FROM_PROGRAM, -- The program or service program name that sent
the
message.
FROM_MODULE, -- The module that sent the message.
FROM_PROCEDURE, -- The procedure that sent the message.
FROM_INSTRUCTION, -- The instruction that sent the message.
TO_LIBRARY, -- The library containing the program or service
program that received the message
TO_PROGRAM, -- The program or service program name that
received
the message.
TO_MODULE, -- The module that received the message.
TO_PROCEDURE, -- The procedure that received the message.
TO_INSTRUCTION, -- The instruction that received the message.
FROM_USER, -- The userid of the job when the message was sent.
MESSAGE_FILE, -- The message file containing the message.
MESSAGE_LIBRARY, -- The name of the library containing the message
file.
MESSAGE_TOKEN_LENGTH, -- The length of the MESSAGE_TOKENS string.
MESSAGE_TOKENS, -- The message token string. If the value is longer
than 2048 characters, it will be truncated with no warning.
MESSAGE_TEXT, -- The first level text of the message including
tokens.
MESSAGE_SECOND_LEVEL_TEXT -- The second level text of the message
including tokens.
from table(qsys2.joblog_info('*')) A
where message_id='CPF1124'
order by ordinal_position desc
fetch first row only;

Job 299789/QUSER/QZDASOINIT started on 06/07/18 at 10:52:52 in subsystem
QUSRWRK in QSYS. Job entered system on 06/07/18 at 10:52:52.
The "ending" message does not display the subsystem.

One could submit an RFE.


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.