title: Generating HTML from PL/SQL
body: <pre><code>CREATE OR replace PROCEDURE Hello_world2
  IS
  BEGIN
      HTP.htmlopen;
      HTP.headopen;
      HTP.Title ('You knew it was coming...');
      HTP.headclose;
      HTP.comment ('This phrase is in every computer book.');
      HTP.Bodyopen (cattributes =&gt; 'body bgcolor=blue');
      HTP.Print ('And here it is .... Hello, World!');
      HTP.bodyclose;
      HTP.htmlclose;
  END; 
  </code></pre>
  
  <p>How can I output this to an HTML file? I have tried as shown below:</p>
  
  <pre><code>spool report.htm
  exec hello_world2;
  spool off
  exit
  </code></pre>
  
  <p>But I am getting error as shown below:</p>
  
  <pre><code>    ORA-06502: PL/SQL: numeric or value error
      ORA-06512: at "SYS.OWA_UTIL", line 356
      ORA-06512: at "SYS.HTP", line 1368
      ORA-06512: at "SYS.HTP", line 1443
      ORA-06512: at "SYS.HTP", line 1735
      ORA-06512: at "SYS.HTP", line 72
      ORA-06512: at "T416493.HELLO_WORLD2", line 4
      ORA-06512: at line 1
  </code></pre>
  
  <p>Can anyone help me with this</p>