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



Rob,

Nice output.
Need a break on start date, display duration as HHMMSS, subtotal duration, grand total duration.
See my other post for sample.
Would all this possible with SQL?

Paul

From: Rob Berendt [mailto:rob@xxxxxxxxx]
Sent: Wednesday, April 26, 2017 2:04 PM
To: Midrange Systems Technical Discussion
Subject: Re: Need to find job start, job end, calculate total job time for a group of users, TST*, for a selected date range

With T1 as (
Select timestamp_format(substr(FLASTR,69,8) concat ' ' concat substr(FLASTR,81,8), 'MM/DD/YY HH24:MI:SS') as Start_timestamp,
substr(flastr, 38, 8) as Job_User, substr(flastr, 47, 10) as Job_name,
substr(flastr, 31, 26) as FQ_Job_name
from rob.flastr
where substr(flastr, 38, 8) = 'MIMIXOWN' and substr(flastr, 47, 10) = 'RCV_RUNCMD')
, T2 as (
Select timestamp_format(substr(FLAEND,67,8) concat ' ' concat substr(FLAEND,79,8), 'MM/DD/YY HH24:MI:SS') as End_timestamp,
substr(flaend, 38, 8) as Job_User, substr(flaend, 47, 10) as Job_name,
substr(flaend, 31, 26) as FQ_Job_name
from rob.flaend
where substr(flaend, 38, 8) = 'MIMIXOWN' and substr(flaend, 47, 10) = 'RCV_RUNCMD')
select t1.FQ_Job_name, t1.Job_User, t1.Job_name, t1.Start_timestamp, t2.End_timestamp,
t2.End_timestamp - t1.Start_timestamp as Job_duration
from t1 left outer join t2 on (t1.FQ_Job_name = t2.FQ_Job_name)
order by 6 desc;

[cid:image001.gif@01D2BE96.B70BA050]


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<http://www.dekko.com/>

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.