Use the Parameters window to specify parameter options for a new routine parameter.
- Parameter mode
- Specify which type of parameter to create.
- In
- Specifies that the parameter is an input parameter that passes values to the routine from the client application. Input parameters do not contain a value when the routine returns control to the client application.
- Out
- Specifies that the parameter is an output parameter that returns values from the routine to the client application. If a routine fails to set one or more of the output-only parameters, the database does not detect the error in the routine. Instead, the database returns the output parameters to the client application with the values that were established when the routine was started.
- InOut
- Specifies that the parameter is both an input and output parameter. Input and output parameters can pass values to the routine from the client application and return values from the routine to the client application.
- Name
- Type a name for the parameter.
- SQL type
- Select an SQL data type. The controls below this field will change based on the SQL data type that you select. For non-PL/SQL routines.
- PL/SQL type
- Select an PL/SQL data type. The controls below this field will change based on the PL/SQL data type that you select. For PL/SQL routines.
- Length
- Type a length for the selected SQL type. This option is available only for the following SQL data types: BLOB, CHAR, CLOB, DBCLOB, GRAPHIC, VARGRAPHIC, and VARCHAR.
- Unit
- Select a unit of size for the selected SQL data type. This option is available only for the following SQL data types: BLOB, CLOB, and DBCLOB.
- Precision
- Type a number (between 1 and 31) for the total number of digits that the value can contain. This option is available only for the following SQL data types: DECIMAL, FLOAT, and NUMERIC. The precision of binary integers and decimal numbers is the total number of binary or decimal digits, excluding the sign. The precision of floating-point numbers is either single or double, which refers to the number of digits in the fraction. The precision cannot be negative.
- Scale
- Type a number for the number of digits to the right of the decimal point. This option is available only for the following SQL data types: DECIMAL, FLOAT, and NUMERIC. The scale cannot be negative or greater than the precision. The maximum precision is 31 digits. If you specify a scale, you must also specify a precision. By default, the scale is 0.
- Comments
- Type comments for the parameter.
- For bit data
- Specifies the bit data subtype for all character strings. Available only for the following SQL data types: CHAR and VARCHAR. The bytes of a character string with the bit data subtype do not represent characters. When you specify this option, no character conversion is performed on character strings. Tip: This option is useful when you are passing large binary strings, such as encrypted passwords, to a routine. For non-PL/SQL routines.
- Character subtype
- For DB2® for z/OS® only, specify charter subtype options.
- No character subtype
- Specifies that there will be no subtypes for character strings.
- For SBCS data
- Specifies that you want to use single-byte character set (SBCS) characters for all character strings.
- For bit data
- Specifies the bit data subtype for all character strings. Available only for the following SQL data types: CHAR and VARCHAR. The bytes of a character string with the bit data subtype do not represent characters. When you specify this option, no character conversion is performed on character strings. Tip: This option is useful when you are passing large binary strings, such as encrypted passwords, to a routine.
- For mixed data
- Specifies that you want to use the mixed data subtype for all character strings.
- Encoding scheme
- For DB2 for z/OS only, specify encoding scheme options.
- Default
- Specifies that you want to use the default encoding scheme.
- ASCII
- Specifies that you want to use ASCII as the encoding scheme.
- EBCDIC
- Specifies that you want to use EBCDIC as the encoding scheme.
- Unicode
- Specifies that you want to use Unicode as the encoding scheme.