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



Excellent description Gary.

Quite easily translated into:
WITH T1 AS (
SELECT SUBSTR(SYSLOGFLD,11,10) AS JOBNAME,
SUBSTR(SYSLOGFLD,21,10) AS JOBUSER,
SUBSTR(SYSLOGFLD,31,6) AS JOBNBR,
SUBSTR(SYSLOGFLD,37,1) AS CENTURY,
SUBSTR(SYSLOGFLD,38,6) AS DATEYYMMDD,
SUBSTR(SYSLOGFLD,44,6) AS TIMEHHMMSS,
SUBSTR(SYSLOGFLD,50,7) AS MSGID
FROM QHST07273A
WHERE SUBSTR(SYSLOGFLD,50,7) IN('CPF1124','CPF1164')
)
SELECT A.*, B.DATEYYMMDD AS ENDDATE, B.TIMEHHMMSS AS ENDTIME
FROM T1 A LEFT OUTER JOIN T1 B USING(JOBNAME, JOBUSER, JOBNBR)
WHERE A.MSGID='CPF1124' AND B.MSGID='CPF1164'

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9
JOBNAME JOBUSER JOBNBR CENTURY DATEYYMMDD TIMEHHMMSS MSGID
ENDDATE ENDTIME
SMDUPD QNOTES 035708 1 070930 060009 CPF1124
070930 060122
SMDUPD QNOTES 035709 1 070930 060009 CPF1124
070930 060025
QPMACLCT QPGMR 035710 1 070930 060015 CPF1124
070930 060101

Wouldn't take much work to convert the dates and times and calculate
durations. Taking into mind jobs that didn't end yet and have to have a
default plugged in or something.

Oh, this is V5R4. The only difference would be prior to that you'd have
to handle 'USING(...' differently with 'ON ...'.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.