Developing Native SQL Stored Procedures
To get started with native SQL stored procedure support in Db2 for z/OS Development:
- Create a file or a data set member with the .spsql extension.
- Enter the SQL statements for the procedure in the file.
- To quickly start with a template, use the
content assist option in the SQL Editor.createProcedureNative: CREATE PROCEDURE (SQL - native) statement
For more information, see creating Native SQL Procedures in the Db2 for z/OS documentation.
- Example of Native SQL stored procedure:
-
CREATE PROCEDURE TAN (IN X DOUBLE, OUT RESULT DOUBLE) VERSION V1 ISOLATION LEVEL CS LANGUAGE SQL PACKAGE OWNER SYSADM WLM ENVIRONMENT FOR DEBUG MODE WLMENV1 ALLOW DEBUG MODE P1: BEGIN SET RESULT = TAN(x); END P1#