Procedures Wizard (DB2 Z/OS)
Go Up to IBM DB2 for z/OS Object Wizards
Procedures are a reusable block of PL/SQL, stored in the database, that applications can call. Procedures streamline code development, debugging, and maintenance by being reusable. Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.
To create a new procedure using a wizard
- Open a creation wizard for a procedure. For details, see Opening an Object Wizard.
- Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
- Properties panel. For details, see Procedures (DB2 z/OS) - Properties.
- Parameters panel. For details, see Procedures (DB2 z/OS) - Parameters.
- DDL View panel. For details, see Previewing the DDL Generated to Create the New Object.
- Click Execute to create the object.
Important Notes
- If you are creating a SQL routine procedure, you must have the latest DB2 fix pack installed on your OS/390 Client. If you do not have the latest fix pack installed, the SQL routine procedure creation will fail.
Procedures (DB2 z/OS) - Properties
When creating or editing a procedure, this tab/panel lets you work with the following settings:
| Setting | Description |
|---|---|
|
Schema, Name, and Specific Name |
Select the schema that is to own the procedure, provide a name for the procedure, and provide the Specific Name for the procedure. |
|
Language |
The database manager calls the procedure accordingly assuming the program is designed to run in the server's environment.
|
|
SQL Access Level |
|
|
WLM Environment |
Specify a Workload Management Environment. Required if Language is JAVA/COMPJAVA/REXX, the Procedure contains a LOB parameter, or Security is set to |
|
WLM For Nested |
Self-explanatory. |
Procedures (DB2 z/OS) - Parameters
For each parameter for this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type, specify a Parameter Mode of INPUT, OUTPUT, or INPUT_OUTPUT, and if appropriate, the Precision, Scale, and Size options.