× 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.



Will the file name be the same all the time? The QUSLMBR (member list) API
should provide you with what you want.

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Bruce Guetzkow
Sent: Friday, June 24, 2005 11:16 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Finding all occurences of a member in the library list

Paul:

<snip>
I would be interested to know of any ideas of how I might be able to
find the file and library name of a member , where that file can exist
several times in the library list. This from an RPG program , so that I
can afterwards do a OVRDBF to the pertinent library/file/member
combination. 

Eg 
LIB1 has QSQLSRC
LIB2 has QSQLSRC
LIB3 has QSQLSRC with the required member 
</snip>


>From RPG you can call API QUSRJOBI, specifying format JOBI0700 (or
possibly JOBI0750 if you need additional information).  I haven't used
this API, so I don't have an example.  From the list of libraries, I'd
call QCMDEXC (or other variants) to execute command
        CHKOBJ OBJ(library/QSQLSRC) OBJTYPE(*FILE) MBR(srcmbr)
for each non-blank entry.  You could also call a CL to execute the
command, passing the library, file and member names.


In CL I'd use the command
        RTVJOBA USRLIBL(&USRLIBL)
to retrieve the user portion of the library list (at V5R3 the field has
a length of 2750:  275 values, 10-bytes each).  Parse through the list
and loop through it, executing command
        CHKOBJ OBJ(library/QSQLSRC) OBJTYPE(*FILE) MBR(srcmbr)
for each non-blank entry.

Hope that helps,
--Bruce Guetzkow


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.