×
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.
Yes. And it is really easy. DSPOBJD to an outfile should be forgotten
for those on a supported version of the OS.
Start out at:
http://ibm.biz/DB2foriServices
Then you want to look at OBJECT_STATISTICS. As in:
SELECT
obj.objname, obj.objlib, obj.journaled, obj.journal_name,
obj.journal_library,
obj.*
FROM
TABLE(QSYS2.OBJECT_STATISTICS('*ALL','*PGM')) AS OBJ
WHERE OBJ.OBJNAME='ACD0010';
In the earlier days of OBJECT_STATISTICS, to get the *ALL to work you used
to have to LATERAL it like the following, in which one run was to get the
list of libraries and the other was to find the objects in that library:
SELECT
obj.objname, obj.objlib,obj.objlibrary, obj.journaled, obj.journal_name,
obj.journal_library,
obj.*
FROM
TABLE(QSYS2.OBJECT_STATISTICS('*ALL','*LIB')) AS lib
INNER JOIN LATERAL
(
SELECT lib.objname as objlibrary, xobj.*
FROM
TABLE(QSYS2.OBJECT_STATISTICS( lib.objname
, 'FILE')
) AS xobj
) AS obj
ON lib.objname = obj.objlibrary
WHERE obj.objattribute<>''
AND obj.journal_name='CKATRHIS';
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.