Calling Sybase Stored proc from UNIX Shellscript.

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 tried to find a solution but when 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.

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

Moderator comments were removed during original forum migration.