Thank you soooo much Rob. This gives me what exactly I need but I have a
couple of follow-up questions.

What controls the purge of this table / how far back is the data kept?
What release of the OS was this first available?


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob
Berendt
Sent: Monday, November 13, 2017 2:53 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Retrieving a job's end code

I only had this
and date(message_timestamp)='2017-11-12'
and hour(message_timestamp)=23
and minute(message_timestamp)=49
because I knew of a job at that time with a higher ending severity.

The binary displayed was 001E
Which, any idiot knows is integer 30
but I just have some other priorities than to finish that.


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: Rob Berendt <rob@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 11/13/2017 02:49 PM
Subject: RE: Retrieving a job's end code
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



I'm having a little problem converting binary to integer but you could
start with this:

Putting it below but if the mail processing hacks the double dashes try
this instead
https://code.midrange.com/eaf508c133.html


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.
substr(message_tokens, 49, 2) as Ending_Code_c,
binary(substr(message_tokens, 49, 2)) as Ending_Code_binary,
cast(binary(substr(message_tokens, 49, 2)) as integer) as Ending_Code,
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'
and date(message_timestamp)='2017-11-12'
and hour(message_timestamp)=23
and minute(message_timestamp)=49
ORDER BY ORDINAL_POSITION desc;


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.