× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 13-Jan-2014 15:08 -0800, TheBorg wrote:

To get a *list* of objects from the QSYS library, you need to to
specify '*ALL' as the object type in the table function:

Select *
From (
Select * from table(QSYS2.OBJECT_STATISTICS('QSYS', '*ALL')) as x
) objstat
Where objtype = '*PGM'


The special value *ALL is no more an object type than the special value *LIBL is a library name. And the documentation for the table function at the given link, mentioned nothing about support for any special values other than those that represent an [and presumably only external] object type. Are people supposed to just guess what is or is not supported with regard to special values ;-)

Is the above invocation verified to provide expected results, or is that based only on speculation that some special values other than actual external object types would be allowed in the object-type-list parameter [and if so, then perhaps also the library-name parameter]?

Not sure why the prior examples offered use a CTE, nor why the above NTE is not simply coded as a table-reference in the form of a table-function invocation; i.e. why not just the following?:

Select x.*
From table(QSYS2.OBJECT_STATISTICS('QSYS', '*ALL')) as x
Where x.objtype = '*PGM'

But even that would be silly if indeed *ALL were supported as a special value, because all of that data would be generated for all object types, but then the final query results would include only those objects of type *PGM. Surely it would be best to have the UDTF generate only the minimal amount of data that will be selected; i.e. why not just the following?:

Select x.*
From table(QSYS2.OBJECT_STATISTICS('QSYS', 'PGM')) as x
/* Where x.objtype = '*PGM' */ -- omit; implied by UDTF inputs


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.