<< unmatched error

Hi all,

I want to call a plsql package that does not return any value.
I am using the following script to do so:

sqlplus $UserNamePwd <<EOF
set head off
begin
test_pkg.procedure('$DebugFlag');
end;
exit
EOF      
if [ $? != 0 ]
then
 log_message  "procedure failed."
 exit 1
fi
exit $?

I am getting the following error :

syntax error at line 171: '<<' unmatched.

Please help.

What OS and shell are you using?

You show here 13 lines and your error says at line 171...
What if its because something before or after the lines you gave?
We are not wizards...

e.g. What proof do we have that your EOF is at the very beginning of a line as you extracted it for a larger script?