-----------------------------------------------------------
--        name
--     version
-- description
--    synopsis
--       usage
--    comments
--    creation
--   copyright
--    warranty
--      author
--     changes
----------------------------------------------------------

-----------------------------------------------------------
-- public specifications for package
-----------------------------------------------------------
CREATE OR REPLACE PACKAGE packagename
AS
  -- Public declaration of variable
  variablename CONSTANT datatype := initialvalue;

  -- Public declaration of exception
  exceptionname EXCEPTION;

  -- Public declaration of function 
  FUNCTION functionname 
    (parameter1 IN datatype,
    parameter2 IN datatype)
  RETURN datatype;

  -- Public declaration of procedure
  PROCEDURE procedurename
    (parameter1 IN datatype,
    parameter2 IN datatype);

  -- Pragmas for the function and exception
  PRAGMA RESTRICT_REFERENCES (functionname, 'WNDS');
  PRAGMA EXCEPTION_INIT (exceptionname, -20001);
  
END packagename
/

-----------------------------------------------------------
-- private elements of package
-----------------------------------------------------------
CREATE OR REPLACE PACKAGE BODY packagebodyname
AS

  FUNCTION functionname 
    (parameter1 IN datatype,
    parameter2 IN datatype)
  RETURN datatype
  IS
  BEGIN
  EXCEPTION
  END functionname;

  PROCEDURE procedurename
    (parameter1 IN datatype,
    parameter2 IN datatype)
  IS
  BEGIN
  EXCEPTION
  END procedurename;

BEGIN
  -- initialization code 
END packagebodyname
/