Using Dynamic Procedure Parameters [ ALLBASE/SQL Advanced Application Programming Guide ] MPE/iX 5.0 Documentation
ALLBASE/SQL Advanced Application Programming Guide
Using Dynamic Procedure Parameters
You can specify dynamic parameters in a prepared EXECUTE PROCEDURE
statement. Dynamic input parameters are passed from host variables or an
SQLDA data buffer in the application to procedure parmeters. Dynamic
output parameters are passed from procedure parameters to host variables
or an SQLDA data buffer in the application. Table 5-2 shows when
dynamic parameter values are passed.
Table 5-2. When Dynamic Parameters are Passed Between an Application and a Procedure
----------------------------------------------------------------------------------------------
| | | |
| Type of Processing | Input Parameter Values | Output Parameter Values |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Cursor Processing | OPEN | CLOSE |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Non-Cursor Processing | EXECUTE PROCEDURE | EXECUTE PROCEDURE |
| | | |
----------------------------------------------------------------------------------------------
The following statement contains three dynamic procedure parameters:
EXECUTE PROCEDURE ? = InventoryReport (?, ? OUTPUT)
Note that a procedure return status is always an output (only) parameter.
Any other dynamic procedure parameter is assumed to be for input only
unless OUTPUT or OUTPUT ONLY is specified.
Refer to the ALLBASE/SQL Reference Manual for complete syntax and to the
"Using Parameter Substitution in Dynamic Statements" chapter in this
manual.[REV END]
MPE/iX 5.0 Documentation