to create a export query from a file

Hi Guys,,,

I have a file which is of this type.

abdc
defd
afds
adfse

I want to create a export statement like this.

Db2 "export to /clocal/rem/user/rem/used.txt of del select * from t.tel where name in ('abdc','defd','afds','adfse') with ur"

Please help me..

Thanks for your help in advance,,,

Regards,
Magesh.

 
 
 
awk 'BEGIN { str=""} { str=str "\47" $0  "\47," } END { print "DB2\"export to /clocal/rem/user/rem/used.txt of del select * f
rom t.tel where name in("substr(str,1,length(str)-1) ") with ur\"" }' rem.txt

 
 inputfile

thanks Panyam for your help.. its so helpful