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



On 7/13/2015 2:01 PM, CRPence wrote:
select dbffil, dbflib, dbffdp, dbfldp, dbftdp
from qsys.qadbldep /* publicly authorized logical file */
/* the physical file is QADBFDEP; needs *ALLOBJ SpcAut */
where dbflib <> dbfldp /* cross-library */
and dbftdp in ('D', 'V', 'I') /* I think this is exhaustive */

I found this quite helpful, thanks Chuck.

Paying it forward, I added the long SQL name for the dependent file,
because in my case I have views with long names (customer_sales_2012).

I used SYSTABLES because... well, I have authority to it and it's a JOIN
and I don't want to re-invent the wheel.

-- ordered by 'depends on'
select substr(dbffil, 1, 10) as file, dbflib as lib,
coalesce(table_name, dbffdp) as depfile, dbfldp as deplib, dbftdp as
type
from qsys.qadbldep
left join qsys2.systables
on substr(dbffdp, 1, 10) = system_table_name
and dbfldp = table_schema
where dbflib <> dbfldp
and dbftdp in ('D', 'V', 'I')
and dbflib <> 'QSYS'
and dbflib <> 'QSYS2'
order by 2, 1, 4, 3;


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.