## Parameter Specification (parameter spec)

A parameter specification (parameter spec) identifies the parameter name and, if necessary, the indicator name needed to specify a parameter.

### Syntax

<parameter_spec> ::= <parameter_name> [<indicator_name>]

### Explanation

The indicator must be declared as a variable in the embedding programming language. It must be possible to assign at least four-digit integers to this variable.

A distinction is made between output parameters and input parameters:

· Output parameters: parameters that are to receive values retrieved from the database system.

- An indicator parameter with the value 0 indicates that the transferred value is not a NULL value and that the parameter value is the transferred value.

- An indicator with the value –1 indicates that the parameter value is the NULL value.

- Alphanumeric output parameters: an indicator with a value greater than 0 indicates that the assigned character string was too long and has been truncated. The indicator specifies the untruncated length of the original output column.

- Numeric output parameters: an indicator with a value greater than 0 indicates that the assigned value has too many significant digits and decimal places have been truncated. The indicator specifies the number of digits in the original value.

- For numeric output parameters, an indicator with the value -2 indicates that the parameter value is the special NULL value.

· Input parameters: parameters containing values that are to be transferred to the database system.

- An indicator with a value greater than or equal to 0 indicates that the specified parameter value is the value that is to be transferred to the database system.

- An indicator with a value less than 0 indicates that the specified parameter value is the NULL value.