Sybase Stored Proc call from UNIX script.

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with the desired records. i have created the input file "test.sql" which executes the SP and all the server details and input output file details are in ".SH file" i have the Output file also in the same location. i tried to execute the SP in rapid sql and found that the SP works well. i dont have any parameter pasing here.

Please correct me if i am wrong anywhere. and this is an Urgent requirement.

.SH FILE :

#!/bin/ksh -x

isql -S${Servername} -D${Database name } -I$ test.Sql -O$ Outfile.OUT -U${username} -P${password}

INPUT FILE: test.sql

use BenefitDB
go

exec Sample_SP
go

Your shell script uses several variables ( Servername , Database name [which contains two spaces that are not allowed in variable names], test [which contains a space that is not allowed in variable names], Outfile [which contains a space that is not allowed in variable names], username , and password ) which are not assigned values before they are used (unless you have exported them into your environment before invoking your shell script. Three of those will lead to shell syntax errors and the others will expand to empty strings (again, unless the corresponding variables have been exported into your current shell execution environment).

There may well be other problems as well, but these are enough to mask any other problems that might occur in your SQL statements once you get past the shell syntax errors.