find a named query

15 pts.
Tags:
find
Query/400
i know the name of a query, but not the name of the library it was stored in. company is large and libraries are many -- is there a simple way to find this query and which library it is in?

Answer Wiki

Thanks. We'll let you know when a new response is added.

DSPOBJD *ALL/QRYNAME *QRYDFN

=======================================================

On the systems that I’ve worked on in recent years, the fastest way to locate some object has been:<pre>
WRKOBJ *ALLUSR/objectname</pre>

I’m not sure why leaving the ObjectType off of the request has been faster, though I could make some guesses.

And the resulting list includes all objects named “objectname” regardless of what kinds of objects they are. Usually, a particular name isn’t duplicated very many times, so the list is short. Seeing the one that is a *QRYDFN or *QMQRY by eye is just about as fast as taking the time to type it in at the beginning.

Tom

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jtkiii
    thanks tom. your solution worked. unfortunately, my hidden query remains a mystery -- it was not found. so, back to the drawing boards! maybe just recreate it. thanks again! jt
    15 pointsBadges:
    report
  • BigKat
    Maybe the name is not quite what you think try using part of the name and wild carding it instead of wrkobj *allusr/queryname try wrkobj *allusr/queryn* good luck - :)
    8,330 pointsBadges:
    report
  • TomLiotta
    Also, are you certain that you have authority to it? If you have authority and you know the name, then WRKOBJ will find it. (As will DSPOBJD.) If the conditions are met and it's not found, it either doesn't exist or IBM should be contacted. BigKat's suggestion about wild-cards definitely should be considered. Of course, if a generic name finds a hit and the name doesn't match what you believe it should be, you have to keep in mind that the hit might not be the right object. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following