qry/400 list of queries

pts.
Tags:
AS/400
Trying to generate a query list for a library without using DSPOBJD. That method is too slow. In all reality it will be several libraries. I assume the list is stored somewhere for it to come up when you hit F4 in WRKQRY. If it is not stored somewhere then whatever happens when you hit F4 is way faster than doing a DSPOBJD for a library.

Answer Wiki

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

are you specifying OBJTYPE?

DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*QRYDFN) only takes a few seconds to run on our system (>66k files in in 116 libraries. only a small percentage of those files are query definitions.)

The first time the DSPOBJD runs, it takes < 10 seconds, after that, it returns very quickly, the DSPOBJD for a single library would probably run very fast.

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

Generating a “query list” implies DSPOBJD OUTPUT(*OUTFILE). The outfile is full of detail info about each object. The <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/quslobj.htm”>QUSLOBJ (List Objects) API</a> provides an important clue about returning full information about objects: “For performance reasons, you should choose the format that returns only as much information as you need. The higher the number of the format name, the more information is returned and the more time it takes to process.”

There are nine formats in which QUSLOBJ can return info, each one taking longer to fulfill. If you want nothing but a simple list of names, such as WRKQRY can use, a list can be built relatively quickly. The list isn’t built into a database file; that would slow things down. DSPOBJD not only returns most object info; it also writes each item to a database file.

So, if the list as what you need, call the API and request format OBJL0100. Or put up with any delay.

Tom

Discuss This Question: 1  Reply

 
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
  • astradyne
    You can try looking at the QUSLOBJ system API to generate the list of queries. This API will build a list of objects matching your selection criteria and store the list in a user space. There's an example of how to do this at http://www.code400.com/forum/showthread.php?t=396 If you Google "QUSLOBJ" you should find plenty more examples. Hope it helps Jonathan
    370 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