Parameter style GENERAL WITH NULLS

The GENERAL WITH NULLS parameter style passes both parameter values and null indicator values to an external program.

With this parameter style, the parameters are passed into the program as follows:

Read syntax diagramSkip visual syntax diagramSQL-parameterSQL-parameter-ind-array
SQL-parameter
This argument is set by Db2 before calling the procedure. This value repeats n times, where n is the number of parameters specified in the procedure call. The value of each of these parameters is taken from the expression specified in the CALL statement. It is expressed in the data type of the defined parameter in the CREATE PROCEDURE statement. Note: Changes to any parameters that are defined as INPUT will be ignored by Db2 upon return.
SQL-parameter-ind-array
This argument is set by Db2 before calling the procedure. It can be used by the procedure to determine if one or more SQL-parameters are null or not. It is an array of two-byte signed integers (indicators). The nth array argument corresponds to the nth SQL-parameter. Each array entry is set to one of the following values:
0
The parameter is present and not null.
-1
The parameter is null.

The procedure should check for null input. Note: Changes to any indicator array entries that correspond to parameters that are defined as INPUT will be ignored by Db2 upon return.