Creating a native SQL stored procedure
Use the following procedure to create a native SQL stored procedure.
- On the BMC AMI Change Manager for Db2 Main Menu, select WORKID, and press Enter.
- On the WORKID Action Menu, type the name of the WORKID or type a wildcard pattern to display a list of work IDs. Then, select Specify Db2 definitions and press Enter.
- On the Object Specification panel, specify the name of a stored procedure (or use wildcard characters). Then, press Enter.
- On the Command line of the Mixed List panel, type CSP.
- Specify the options for the native SQL stored procedure.
- At Procedure Version, type a value for the version or leave the value blank. The version must begin with an alphabetic character. Db2 defaults the value to V1.
- At Origin, type N (native).
- At Language, type SQL.
- Specify any other options for the procedure.
- Press Enter.
- To specify additional options for the native SQL stored procedure, type S to select Proc Options.
- On the Create Native Procedure Options panel, modify the options, and then press END to return to the Create Procedure panel.
- On the Create Procedure panel, to specify the parameters for the native SQL stored procedure, type S to select Parameters.
- On the Procedure Parameter List panel, specify the parameters, and then press END to return to the Create Procedure panel.
- On the Create Procedure panel, to specify the comment for the native SQL stored procedure, type S to select Comment.
- On the Procedure Comment panel, modify the comment, and then press END to return to the Create Procedure panel.
- Specify the text for the native SQL stored procedure.
- Type S to select Text.The product invokes the ISPF editor.
- Type the text for the body of the procedure.If the body exceeds the width of the screen, you can scroll the panel to the right to provide additional text.
- Press END.
- To specify the path for the native SQL stored procedure, type S to select Path.
- On the Procedure Package Path panel, modify the path, and then press END to return to the Create Procedure panel.
- Press END.Now that the create the stored procedure has been created, you can analyze a work ID and execute a worklist.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*