Thanks for your suggestion guys.The problem has been resolved.When i saw the error log then i saw that i had not used MS.VOTE in my query. Due to that call to DB2 was failing . But i want to ask one more query here that why there was problem with browser and not with command prompt.
My first guess would be that you have some database-related variables set in your environment that are used when you're running it from the command line, but your web server / CGI environment is different.