J9 - right you are....I see that that technote has been archived. You might want to check with OAM support before running any of these just in case things have changed in the newer releases.
Anyway, here's the technote:
To find "orphaned" objects on DB2 DASD (Objects that have an Object Directory Table Entry, but no corresponding row(s) in either the 4K or 32K tables):
For the 32K table:
SELECT * FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE > 3980
AND A.ODLOCFL = 'D'
AND NOT EXISTS (SELECT * FROM GROUP03.OSM_32K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
For the 4K table:
SELECT * FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE <= 3980
AND A.ODLOCFL = 'D'
AND NOT EXISTS (SELECT * FROM GROUP03.OSM_04K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
To delete any "orphaned" Object Directory Table rows:
For the 32K table:
DELETE FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE > 3980
AND A.ODLOCFL = 'D'
AND NOT EXISTS (SELECT * FROM GROUP03.OSM_32K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
For the 4K table:
DELETE FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE <= 3980
AND A.ODLOCFL = 'D'
AND NOT EXISTS (SELECT * FROM GROUP03.OSM_04K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
To find Objects where the Object Directory entry shows "Tape", but data is still on DB2 DASD ("should have been deleted" 32K table entries):
SELECT * FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE > 3980
AND A.ODLOCFL = 'T'
AND EXISTS (SELECT * FROM GROUP03.OSM_32K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
To find Objects where the Object Directory entry shows "Tape", but data is still on DB2 DASD ("should have been deleted" 4K table entries):
SELECT * FROM GROUP03.OSM_OBJ_DIR A
WHERE A.ODSIZE <= 3980
AND A.ODLOCFL = 'T'
AND EXISTS (SELECT * FROM GROUP03.OSM_04K_OBJ_TBL B
WHERE A.ODCLID = B.OTCLID AND
A.ODNAME = B.OTNAME);
To find unique collection IDs used by a particular Storage Group:
SELECT DISTINCT ODCLID FROM GROUP03.V_OSM_OBJ_DIR;
To Update a row in the Object Directory table:
UPDATE GROUP03.OSM_OBJ_DIR
SET ODBKLOC='TMD009' WHERE ODNAME='GROUP03.OBJA' AND ODCLID=1;
Ed