Creating DB2 Stored Procedure from the command line

In order to create a DB2 stored procedures from the command line, all what you need to do is:
1. Place "@" at the end of your "CREATE PROCEDURE" script as follows:

CREATE PROCEDURE myScheme.myProcedure
IN someParameter BIGINT
-- Some SQL statements

[email protected]

2. Let’s assume that the script file name which contains the stored procedure sql is "someScript.sql", In order to execute the DB2 stored procedure creation script, run the following command from the command line:

db2 [email protected] -svf someScript.sql

After running the command, you should see the success message as follows:

"DB20000I  The SQL command completed successfully.