DB2, How to save all stored procedures as files How does one extract all stored procedures from a DB2 schema as individual files (without using Data Studio so it can be scripted).  I need them all so I can uploaded to source control.  I have found a way to do it via command line if one has access to the server, but do not have server access.
you can use the db2look clp command with the -e option, altough it does not have an option to only export procedures, so unless they are in a schema without other objects you will also get e.g. TABLE, VIEW and other DDL mixed in the output.
$ db2look -d BP -e -cor -nofed -z PAUL | grep -A 999 'DDL Statements for Stored Procedures'
-- DDL Statements for Stored Procedures
---------------------------------


SET SYSIBM.NLS_STRING_UNITS = 'SYSTEM';
SET CURRENT SCHEMA = &quot;PAUL    &quot;;
SET CURRENT PATH = &quot;SYSIBM&quot;,&quot;SYSFUN&quot;,&quot;SYSPROC&quot;,&quot;SYSIBMADM&quot;,&quot;PAUL&quot;;

CREATE OR REPLACE PROCEDURE P ()
BEGIN
          RETURN   /* this */   2  ; -- comment
    /* this is a 
    comment */
END
;


-------------------------------
-- DDL Statements for Triggers
-------------------------------

SET SYSIBM.NLS_STRING_UNITS = 'SYSTEM';
...