|
There is one little caveat about using REFDATE(*SAVLIB).
If you save the library in your backup procedure and then
later save the library for some other reason (for example,
to a save file for FTP transmission to another machine),
you probably aren't getting the REFDATE you want. I use
SAVCHGOBJ for my daily saves and specify a date-time that
was saved in a data area during the last backup SAVLIB.
CRPence wrote:
FWiW the DSPOBJD is potentially a very expensive method to determine "if a library has at least one changed object". I'd
use a SAVCHGOBJ with its default of /since last full save/
[i.e. REFDATE(*SAVLIB)] to determine the answer to the
question; of course with that criteria of since when.
This can be effected with probably fewer resources by
limiting the actual capabilities of the save request by
using a DEV(*SAVF) created with CRTSAVF MAXRCDS(1). Using this
method, a save which has at least one object will fail with
Diag CPF3808 and Escape CPF3815 indicating the maximum number
of records was exceeded. A save which has no objects will /complete/ without saving any objects, then issuing the completion CPC3708 suggesting "all object excluded" for the given reference date\time. For example, using the command strings like:
===> CRTSAVF QTEMP/CHGTEST MAXRCDS(1)
===> SAVCHGOBJ OBJ(*ALL) LIB(&LIBNAME) DEV(*SAVF)
OBJTYPE(*ALL) OBJJRN(*YES) REFDATE(*SAVLIB) SAVF(QTEMP/CHGTEST)
UPDHST(*NO) CLEAR(*ALL) PRECHK(*NO) SAVACT(*NO) ACCPTH(*NO)
SAVFDTA(*YES) DTACPR(*YES) OMITOBJ((&LIBNAME/*ALL *JRN))
OUTPUT(*NONE) /* may want to include output queue data
selection as well */
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.