|
select objlib, objtype, objtext
from table(object_statistics('*ALLUSR','*ALL', 'SOMEOBJECT'))
On Thu, 2020-09-17 at 14:40 -0400, smith5646midrange@xxxxxxxxx wrote:
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?
[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
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.