When an application executes the CALL statement, the DB2 LUW Server builds a parameter list for the stored procedure, using the parameters and values provided in the statement. The DB2 LUW Server obtains information about parameters from the system tables. See the section Defining Stored Procedures under DB2 LUW for more information. Parameters are defined as one of these types:
Input-only parameters, which provide values to the stored procedure.
Output-only parameters, which return values from the stored procedure to the calling program.
Input/output parameters, which provide values to or return values from the stored procedure.
If a stored procedure fails to set one or more of the output-only parameters, the DB2 LUW Server simply returns the output parameters to the calling program, with the values established on entry to the stored procedure. COBOL supports three parameter list conventions. Other languages support other conventions. The parameter list convention is chosen based on the parameter style defined in the CREATE PROCEDURE statement.
| Parameter Style | Description | 
|---|---|
| SIMPLE | Use SIMPLE (or GENERAL) to prevent the calling program passing null values for input parameters (IN or INOUT) to the stored procedure. The stored procedure must declare a variable for each parameter passed in the CALL statement. | 
| SIMPLE WITH NULLS | Use SIMPLE WITH NULLS (or GENERAL WITH NULLS) to allow the calling program to supply a null value for any parameter passed to the stored procedure. The following rules apply: 
 | 
| DB2SQL | In addition to the parameters on the CALL statement, the following arguments are passed to the stored procedure: 
 |