|
I am in the early stages of writing a small archiving program. The user (IT
is my user) will be able to enter an object name and my program will return
a screen showing every location of every type of object that matches the
name. This includes file, dataareas, programs, etc. It will also show
anywhere that if finds a source member with that name. The user will then
be able to select what should or should not be archived. What else they
want on the screen has yet to be defined. I will guess that at some point
when it finds a physical file that they will want to see all of the logical
files too.
If I use the following SQL, it chugs FOREVER (it is still running after 15
minutes).
select objlib, objtype, objtext
from table(object_statistics('*ALLUSR','*ALL'))
where objname = 'SOMEOBJECT'
If I do dspobjd obj(*allusr/someobject) objtype(*all) output(*outfile)
outfile(qtemp/dspobjd), it returns in a second or two.
So, a few questions.
1. Why is the SQL statement so slow?
2. Before I spend time writing a program to use the QUSLOBJ API, does
anyone know if it runs about as fast as DSPOBJD or is it more in line with
the time of the SQL because of the amount of information that it returns
3. Is there another way to retrieve this info that I'm not thinking of?
As an Amazon Associate we earn from qualifying purchases.
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.