purpose of my script is that it should generate a report by running a sql script which is stored in a directory and pull the information from DB.script shld be in such a way that I just need to pass a parameter and it shld generate the report and store it in a directory in a particular format like date and time.
Hello,
You must read up on syntax rules for the script language that You want to use. Your example looks like a mix of different languages and platforms to me. Have You tried to use a script for Windows written in VB (or something) and adapt it to unix/linux? Not much in this script will work...
First of all, what platform/OS are You on?
What script language or shell are You using?
If it really is ksh, please read up on it. Start from the basics, such as writing a "Hello World" program. I promise You, its worth it, because You have to start somewhere.