library1 library2
pf1 lf3
lf1
lf2
i have 2 librares but i want to clear library1 all objects but not clear because depent objects are there in library how to clear all objects in library1,
give me advices
Software/Hardware used:
software
ASKED:
May 17, 2011 5:55 PM
UPDATED:
June 22, 2011 4:50 AM
It is not clear for me exactly what do you need, but I think you could save the file dependencies in a file and then read it from a program to clear the object that has no dependencies.
You can use DSPDBR command to see database dependencies and save this output to a file. Like this:
DSPDBR FILE(MYLIBRARY/*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/MYFILE) MBR(*NONE)
Regards.
The simple answer is that you cannot delete pf1 from library1 until you first delete lf3 from library2.
The system won’t allow pf1 to be deleted until its dependent files are deleted.
You could move lf3 into library1 and then clear library1. You might use the MOVOBJ command to do that.
Tom
Hi, You couldnt be able to clear(or delete) Physical file when there was logical file existing based on PF.
Either you need to delete LF in Library 2 and should try clearing LIbrary1
(or)
Move the LF from Library2 to library1 and try clearing Library.
Pradeep.
thanks your guidelines
When questions like this………….Don’t forget about the QADB* files in QSYS (In this case QADBFDEP)
Don’t forget about the QADB* files in QSYS (In this case QADBFDEP)
Those files should be forgotten. I don’t know of a reason ever to access them, and there is good reason not to. Those are system files that should be left alone for DB2 to use.
IBM has provided a number of alternative interfaces that are much better choices. Use the supplied interfaces.
The DSPDBR command is one simple interface. The views, SYSVIEWDEP and SYSTABDEP in QSYS2, are another. And the List Database Relations (QDBLDBR) API is still another.
When directly accessing DB2 system files, there’s an elevated risk of getting the database cross-references out of sync. That leads to the need for RCLSTG SELECT(*DBXREF) or RCLDBXREF.
Tom