/********************************************************************** * File: user_source.sql * Type: SQL*Plus script * Author: Tim Gorman (Evergreen Database Technologies, Inc.) * Date: 03-May-97 * * Description: * Queries the USER_SOURCE data dictionary view for the text of * a stored PL/SQL package, procedure, or function. * * The source code is spooled to an output file, and then the * default SQL*Plus editor (i.e. "vi" on UNIX, "notepad" on Win) * is launched to view the source code. * * Modifications: *********************************************************************/ set echo off accept name prompt "Enter the name of the package, function, or procedure: " set pages 0 lines 500 feedback off verify off trimspool on termout off select text from user_source where name like upper('&&name') order by type, line spool &&name..sql / spool off set feedback on verify on termout on ed &&name