DB2, How to save all stored procedures as files
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';
...