Db2 query with script

Hi All,

I want to connect two tables in DB2 using shell script and then compare the contents of two tables field by field.and i should return on the screen the un matched records ..

Could any one please help me in connecting database tables using Unix and retriving data from the same.

I am not sure about DB2, I know Oracle, but this helps you?
Link: How to execute db2 query from a unix shell script - DB2 Database answers