Hi Gulrez,
I wonder why you need to device for this much complexity when DB2 offers it in a much simpler way. Follow the below steps for loading data making the constraint valid post load.
Step1) Identify the tables to be loaded( no need for any order or parent/foreign ket relationship to be know at this time).
Step2) Load the data using DB2 Load utility and specify the clause "SET INTEGRITY PENDING CASCADE". Look at below link for more load options.
http://publib.boulder.ibm.com/infoce.../r0008305.html
Step3) Once all your load is complete identify all the tables which have been placed in Check Pending state and run "set integrity" against those tables.
You can build a simple query to check all the tables in check pending state ( e.g query the STATUS flag from syscat.tables view for value C , which indicates that the table is in Check pending state). Use below link for more information.
http://publib.boulder.ibm.com/infoce.../c0004593.html
Step4) You are ready to use all the tables at this step.
Cheers, Vijay