conn xxxx/xxxx@xxxx
SET VERIFY OFF;
SET HEAD OFF;
SET DEFINE OFF;
SET SCAN OFF;
set feedback off;
set linesize 500
set pagesize 50000
set trimspool on
SPOOL D:\Prod\xx.txt
select text from dba_source where name = UPPER('PACKAGE_NAME') and type = 'PACKAGE' and owner = 'APPS' order by line;
select text from dba_source where name = UPPER('PACKAGE_NAME') and type = 'PACKAGE BODY' and owner = 'APPS' order by line;
SET VERIFY ON;
SET HEAD ON;
SET DEFINE ON;
SET SCAN ON;
SPOOL OFF
EXIT;