CREATE OR REPLACE PROCEDURE simple AS
l_user varchar2(30);
BEGIN
   select USER into l_user from dual;

   htp.htmlOpen;

   htp.headOpen;
   htp.title('Simple Example');
   htp.headClose;

   htp.bodyOpen;
   htp.line;
   htp.header(1,'Simple Example');
   htp.line;

   htp.paragraph;
   htp.print('Today''s date is:  ' ||  to_char(sysdate, 'DD/MM/YYYY'));
   htp.br;
   htp.print('Today''s day  is:  ' ||  to_char(sysdate, 'DAY'));

   htp.paragraph;
   htp.print('Ordinary <em>tags</em> can be used ' ||
             'in the strings that we send.');
   htp.print('Your Oracle USERID is ' || USER);
   htp.line;

   htp.address('Raj Sunderraman');
  -- owa_util.signature('orarbkx.simple');
   
   htp.bodyClose;
   htp.htmlClose;
    EXCEPTION
      When others Then
         htp.print(SQLERRM);
         htp.bodyClose;
         htp.htmlClose;
END;
/
show errors
