Deploying a stored procedure
Before you can run a stored procedure from the Data Project Explorer view or any other calling program, you must deploy it on the remote system.
Before you begin
Create a property group for the stored procedure source file in the data development project and set build options for the stored procedure. For more information about creating a property group for stored procedures, see Setting z/OS build options for a stored procedure.
Deploying COBOL and PL/I stored procedures
To deploy a COBOL or PL/I stored procedure, do these steps:
- Open the .spsql file containing the CREATE STORED PROCEDURE statement in the SQL Editor. Right-click anywhere in the SQL Editor and select Db2 for z/OS > Deploy Stored Procedure. The Deploy Stored Procedure wizard opens.
- Specify deployment options on the wizard's page, and then click Deploy. The JCL is generated based on the build options that are set in the Property Group associated with the COBOL or PL/I stored procedure source. The JCL is submitted to the remote system to build the executable file for the stored procedure. This process includes the compiling the source code, linking the load module, binding the Db2® package, and registering the stored procedure in the Db2 catalog.
- After submission, a Job Submission Confirmation dialog appears, displaying the Job along with its assigned job ID. Use the Locate Job button to locate the job in the Remote Systems view. Click the Notify button to receive a notification when the job completes.
- Deployment options
- z/OS System: Select the Remote z/OS System that contains the COBOL or PL/I source. If you are not currently connected, click the Connect button to establish a connection.