title: Error in SQLPLUS declare block
body: <p>I am getting an error in the declare block. I have pasted it below the code.</p>
  
  <pre><code>function XYZ
  {
          sqlplus -s $DB_USR/$DB_USR$pwd_suffix@$SID
          set timing off
          set serveroutput on size 10000
          set feedback off
          spool logname_$sid.out
  
          variable ex_code number
          whenever sqlerror exit 1
          begin
                  :ex_code :=0;
          end;
          /
  
  
          declare
  
           l_cnt number := 0;
           l_sql varchar2(4000) := '';
           l_tmp_name varchar2(100) := '';
      some more code...
  
  }
  </code></pre>
  
  <blockquote>
    <p>./XYZ.sh: line 26: syntax error near unexpected token `('<br>
       ./XYZ.sh: line 26: `         l_sql varchar2(4000) := '';'<br>
       -bash-3.2$ </p>
  </blockquote>
  
  <p>Can somebody tell me what is causing the problem?</p>