|
Loyd, I would probably use chkobj to support everything but *last. If *last is going to be used frequently, you could list the member to a user space using the list members API QUSLMBR. That API is fairly strait forward and you will probably find it useful in other situations. With RPGIV and pointers it would be very fast. You could use the MBRD0100 format which only returns the member names. The number of elements could be used from the heading area of the user space to calculate the location of the last member directly. If you decide to support other formats, be aware that the MBRD0300 format is a little different than the most of the other list API's because you can't calculate the offset to the member information directly from the heading information. One advantage of creating a wrapper around this API is that you can use it as a base for any of the other list APIs. David Morris >>> "Goodbar, Loyd (AFS-Water Valley)" <LGoodbar@afs.bwauto.com> 08/04 8:28 AM >>>> In CL, how do I retrieve a list of database member names? I'm creating a command that uses members, and I'm trying to determine whether the member exists. The hitch is I'm allowing *FIRST or *LAST for the member name, but CHKOBJ doesn't allow *LAST as a member parameter. So, do I use CHKOBJ or is there another way? Thanks, -- Loyd Goodbar Senior Programmer/Analyst Air/Fluid Systems Borg-Warner Automotive Water Valley MS +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.