Hello thanks a lot this answer helped me a lot because you gave me a specific one to look one more time thanks a lot......
I have used the following query may be in future for some one it might be useful..
"select t.TABSCHEMA,t.TABNAME, k.colseq, k.colname from syscat.keycoluse k, syscat.tabconst t where k.constname = t.constname and k.tabname = t.tabname and k.TABSCHEMA = t.TABSCHEMA and t.type='P'and t.TABSCHEMA NOT LIKE 'SYS%'";
Which eliminates the system tables and gets the all the primary keys....
Thanks,
swati