×
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.
While it is likely that you do have some duplicate types, like
MYUSER.MSGQ, MYUSER.USRPRF etc
That can be easily resolved with
WITH t1 AS (
SELECT DIOBNM, q.diobtp, COUNT(*) AS NUMBEROF
FROM QUSRSYS/QAEZDISK q
GROUP BY DIOBNM, q.diobtp
HAVING COUNT(*)>1 )
SELECT q.DIOBNM, DioBLI, q.DIOBTP, DiOBAT, DIOBTX, t1.numberof
FROM QUSRSYS/QAEZDISK Q JOIN T1 ON q.diobnm = t1.diobnm
WHERE DIOBLI<>' ' AND Q.DIOBNM<>' '
ORDER BY Q.DIOBNM, DIOBLI, DIOBTP
However, the original post could be concerned about
DSPOBJD MYUSER
and finding duplicates. It was written for that.
But the tweak may work for you.
In our case we have a shipload of duplicates. Even when breaking by type.
Umpteen copies of a file in different libraries for analysis and that
sort of thing.
If you want to go back to the original, original poster there's always
this:
with T2 as (
select diobnm, diobtp
from qusrsys/qaezdisk
where diobli='QSYS2')
select t2.diobnm, t2.diobtp, q.diobli
from qusrsys/qaezdisk q join t2
on t2.diobnm=q.diobnm and t2.diobtp=q.diobtp
where q.diobli<>'QSYS2'
order by q.diobli, q.diobnm, q.diobtp
Hey! WTH is this? I have a file called LIBLIST in my library! Isn't
that a hoot?
You could clean this up with:
with T2 as (
select diobnm, diobtp
from qusrsys/qaezdisk
where diobli='QSYS2')
select t2.diobnm, t2.diobtp, q.diobli
from qusrsys/qaezdisk q join t2
on t2.diobnm=q.diobnm and t2.diobtp=q.diobtp
where q.diobli<>'QSYS2'
and q.diobnm not in('QSQJRN','SYSCHKCST', 'SYSCOLUMNS', 'SYSCST','
SYSCSTCOL', 'SYSCSTDEP','SYSFIELDS','SYSINDEXES','SYSKEYCST','SYSKEY
S','SYSPACKAGE','SYSREFCST','SYSTABDEP','SYSTABLES','SYSTRIGCOL','SY
STRIGDEP','SYSTRIGGER','SYSTRIGUPD','SYSVIEWDEP','SYSVIEWS')
order by q.diobli, q.diobnm, q.diobtp
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: identify/list any duplicate objects from any two libraries., (continued)
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.