MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » August 2014

Re: Need to get quick database member list for multimember files



fixed

On 04-Aug-2014 13:23 -0500, Richard Schoen wrote:
Would this be done using

SELECT * FROM QSYS2/SYSTABLES


Members are partitions, not tables, so the SYSTABLES catalog VIEW is not of any help. And the catalog VIEW(s) that are helpful, are implemented as User Defined Table Function (UDTF) that might be implemented even faster with one's own coded listing feature per having limited the overall data retrieval requirements; need not be a UDTF if the data need not be available via the SQL, being instead simply a procedure call.

Most likely, for the fastest, to perform an effective Materialize Context (MATCTX) request. Most would code to the List Database File Members (QUSLMBR) API; I was not a big fan, and I would typically defer to DSPFD for the Type (TYPE) information of either *MBR for a date-ordered list or *MBRLIST for a name-ordered list. IIRC, the the list object features\APIs enable listing internal object types; thus why the effective MatCtx is required as an alternative. Some really old methods can be found using, for a chronological-ordered list using the Retrieve Member Description (RTVMBRD) but I always avoided that due to obvious potential issues for concurrent Remove Member (RMVM).






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact