Routine Parameter List
Use the appropriate part of the Routine Parameter List segment whenever you see a reference to a Routine Parameter List in a syntax diagram.
Syntax
Routine Parameter List .-,------------------------. V .-IN----. | |----+-------+--| Parameter |-+---------------------------------| +-OUT---+ '-INOUT-' Parameter |--+-parameter-+------------------------------------------------> | (1) | '-----------' (2) >--+-+-| Subset of SQL Data Type |-----+--+----------------+-+--| | '-LIKE--table--.--column----------' '-DEFAULT--value-' | '-REFERENCES--+-BYTE-+--+--------------+------------------' '-TEXT-' '-DEFAULT NULL-'
- External routines only
- See Subset of SQL Data Types
Element | Description | Restrictions | Syntax |
---|---|---|---|
column | Name of a column whose data type is declared for parameter | Must exist in the specified table | Database Object Name |
parameter | Name of a parameter of the UDR | Name is required for SPL routines | Identifier |
table | Table that contains column | The table must exist in the database | Identifier |
value | Default used if UDR is called with no value for parameter | Must be a literal, of the same data type as parameter. For opaque types, an input function must be defined | Literal Number |
Usage
A parameter is a formal argument in the declaration of a UDR. (When you subsequently invoke a UDR that has parameters, you must substitute a specific argument value for the parameter, unless the parameter has a default value.)
The name of the parameter is optional for external routines of HCL Informix®.
When you create a UDR, you declare a name and data type for each parameter. You can specify the data type directly, or use the LIKE or REFERENCES clause to specify the data type. You can optionally specify a default value.
You can define any number of SPL routine parameters, but the total length of all parameters passed to an SPL routine must be less than 2 gigabytes.
No more than nine arguments to a UDR written in the Java™ language can be DECIMAL data types of SQL that the UDR declares as BigDecimal data types of the Java language.
Any C language UDR that returns an opaque data type must specify opaque_type in the var binary declaration of the C host variable.