How to create DB2 Connections in While loop using shell script

Hi ,
I have to create a db2 connection for the while loop in shell scripting.
Below is the connection for DB2 I have to establish
connect to TABLESCHENMA user $USERID using $PASSWORD

Below is the while loop.
while read TABLE; do
db2 LOAD CLIENT FROM
$DIRECTORY/$TABLE.ixf OF ixf INSERT INTO TABLENAME NONRECOVERABLE INDEXING MODE REBUILD ALLOW NO ACCESS;

done < $input_file

Please help me
If i give the connection above the while loop its not working

Same as this post:
http://www.unix.com/shell-programming-scripting/181383-run-script-export-data-ixf-file-loop.html#post302620499

Double posting is frowned upon in this forum. If you find that you are not getting answers it is usually because you post is difficult to understand or contains insufficient or inconsistent information. In you case it is the latter.