I have used the following with some success;
maybe others can offer suggestions to improve it:
SELECT CAST(routine_name AS CHAR(15)) AS Name,
CAST(routine_schema AS CHAR(10)) AS Library,
routine_type AS Type,
CAST(routine_definer AS CHAR(10)) AS Created_By,
function_origin AS Origin,
routine_definition AS Source_Code
FROM qsys2/sysroutines
WHERE routine_definer NOT IN ('QSYS', 'QLPINSTALL', 'QDIRSRV')
AND ( ( routine_type = 'FUNCTION' ) AND
(function_origin NOT IN ('B')) OR
(routine_type = 'PROCEDURE')
)
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Wednesday, February 15, 2012 9:19 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL - List of Stored Procedures and UDFs
Is there a way to get a list of stored procedures and user defined functions on the system?
A list as in I'd like to see what is there already before I re-invent the wheel? I look this up in Systemi Navigator for the stuff we built. Look in Databases/Youri/Schemas/YourSchema. Nice list of all those things related to the database. It works quite well.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.