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



I am not sure exactly what you mean by "need to search for a database file
in every DDSSRC, RPGLESSRC, CLPSRC, and RPGSRC from every source library on
the system".

If you want a list of all source physical files on the system, the file
QADBXREF in QSYS contains a list of all of the physical and logical files on
the system.  Simply use SQL, OPNQRYF, or QUERY to select records with DBXTYP
= 'S'.  Your RPG program can then process them.

If you are looking for a list of all source physical files which contain a
specific member name, try the following:

             /* Make sure ALLMBRS file exists with size(*NOMAX) specified */
             CHKOBJ     OBJ(MYLIB/ALLMBRS) OBJTYPE(*FILE)
             MONMSG     MSGID(CPF9801) EXEC(DO) /* CPF9801=Object +
                          not found */
             RCVMSG     MSGTYPE(*EXCP)
             DSPFD      FILE(QSYS/QADBFDEP) TYPE(*MBR) +
                          OUTPUT(*OUTFILE) FILEATR(*PF) +
                          OUTFILE(MYLIB/ALLMBRS)
             ENDDO
             CHGPF      FILE(MYLIB/ALLMBRS) SIZE(*NOMAX)

             /* Get a list of all source members on the system        */
             DSPFD      FILE(*ALLUSR/*ALL) TYPE(*MBR) +
                          OUTPUT(*OUTFILE) FILEATR(*PF) +
                          OUTFILE(MYLIB/ALLMBRS)

The file ALLMBRS in the library MYLIB will now contain a list of all members
in all physical and logical files on the system.  Simply use SQL, OPNQRYF,
or QUERY to select records with MBDTAT = 'S' and MBNAME = 'name-of
member-for-which-you-are-searching'.  Your RPG program can then process them

This is a "quick and dirty" approach.  A better approach, of course, would
be to learn to use HAWKEYE.


Charles L.Massoglia, President
Massoglia Technical Consulting, Inc.
cmassoglia@voyager.net
In MI 517-676-9700 or in NC 919-363-9395


----- Original Message -----
From: <Troy.C.Dills@blum.com>
To: <rpg400-l@midrange.com>
Sent: Friday, 14 December, 2001 13:30
Subject: FINDING A FILE


> I have a little project to do that maybe someone has already accomplished.
> I need to search for a database file in every DDSSRC, RPGLESSRC, CLPSRC,
> and RPGSRC from every source library on the system.  Does anyone have
> (RPG) code that would accomplish this task that they would be willing to
> share. I will
> be happy to give you an ataboy?  We have Hawkeye but I don't know how
> to use it.
>
> TIA
> Troy Dills
> Programmer
> RPGIV  V5R1
> Julius Blum Inc.
>
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>



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.