× 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 was looking for backup or save, I never thought to come from the library object angle.

It looks perfect, but there's something else going on with DSPBCKUPL. Libraries I know aren't changed are showing a CHANGE_TIMESTAMP 1m45s (or so) after the save operation. DSPBCKUPL correctly interprets that, but the simple QSYS2.OBJECT_STATISTICS query does not. Not all libraries have this extra change.

Here's my query:
select OBJNAME as Library, date(save_timestamp ) as LastBackup,
case when change_timestamp > save_timestamp or save_timestamp is null then 'Yes'
else 'No' end as Changed,
TEXT as Description, change_timestamp, save_timestamp
from TABLE (QSYS2.OBJECT_STATISTICS('*ALL','LIB') ) AS X


I think this will work for my purposes, just an FYI that it doesn't match DSPBCKUPL exactly.


Thanks



-----Original Message-----
From: Rob Berendt [mailto:rob@xxxxxxxxx]
Sent: Monday, January 15, 2018 2:35 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: DSPBCKUPL: API or service?

Something like this?

select objlib, objname, objtype, change_timestamp, save_timestamp, X.* from table (qsys2.object_statistics('ERPLXF', 'ALL')) AS X WHERE change_timestamp > save_timestamp;

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/QSYS2.Object_Statistics%20table%20function%20ease%20of%20use


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




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.