|
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 mailing list archive is Copyright 1997-2025 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.