Hi,
I have a small package containing a function which returns a ref cursor as an output parameter.
I want to execute this package through SQL*Plus and see the output. How do I do this. It would be great if you could send me the code (a PL/SQL block) on how to see the o/p of the procedure when it is executed. The package when executed contains the records in pOutDocType. How do I see the values in SQL*PLus by executing the package.

The sample package code is below..

CREATE OR REPLACE PACKAGE packGetAllDocumentType
AS
TYPE typDocType IS REF CURSOR;

FUNCTION funcGetDocType(pOutDocType OUT typDocType)
RETURN NUMBER;
END packGetAllDocumentType;
/

CREATE OR REPLACE PACKAGE BODY packGetAllDocumentType
AS
FUNCTION funcGetDocType(pOutDocType OUT typDocType)

RETURN NUMBER
IS
BEGIN
OPEN pOutDocType FOR
SELECT doc_description
FROM document_type;
RETURN 0;

EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error in Package');
RETURN 1;
END funcGetDocType;
END packGetAllDocumentType;
/

Thanks
PC