searching for file names on query definitions

Posted on 2005-04-20
Last Modified: 2007-12-19

How can I search for a particular file name all the queries in a library?


Question by:dprice7
    LVL 26

    Expert Comment


    Technically, you can't. At least, not without some MI programming. Or not without missing some file references such as output files.

    I assume you mean *QRYDFN objects (all of which should have been deleted years ago and replaced with *QMQRY objects, but that's a whole other thread).

    These are "compiled" objects that have no useful attributes that can be extracted by tools from IBM other than WRKQRY and perhaps RTVQMQRY with ALWQRYDFN(*YES) specified.

    For many purposes, RTVQMQRY can help. It will take a *QRYDFN and convert it into a somewhat equivalent SQL statement that is then stored in a source member. The source member can then be scanned for file references.

    Aside from IBM, I'm only aware of a couple variations on a tool named RTVQRYF. You search the web for it or find a .zip download of it through in the Tech Ceneter>Code lists.

    LVL 3

    Assisted Solution

    The program I used and had very good luck with is RTVQRY from

    As previously stated it is an MI program and because of that may not run at your security level.
    LVL 26

    Accepted Solution

    Minor note... The latest RTVQRYF from the late Gary Guthrie should work under security level 40, but I'm not certain that that's the one on iSeries Network.

    Also, there is at least one derivative variation written in ILE RPG that I have seen and it also is not security-level sensitive, using only supported interfaces/APIs. I'd need to do some searching to track it down since I've long used my own custom version.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now