Progress
DataServer
for ORACLE Guide
Retrieving Output Parameter Values
When you call a stored procedure, you can specify the ordered list of positional parameters or you can name them individually. To retrieve output parameter values from an ORACLE stored procedure, you request them with the keyword OUTPUT or INPUT-OUTPUT when you execute the procedure. Output parameters are available only after you close the stored procedure. The following 4GL procedure uses the second option for passing parameters—it passes parameters by name with the PARAM option:
When you name parameters with PARAM, you can name only the parameters that you want to use, in any order. When you call parameters by position, you must specify all the parameters expected by the stored procedure and in the expected order.
If the stored procedure names a default value for the parameter, you do not have to name that parameter at run time. However, you must explicitly name parameters that do not have defaults or when you want to pass values that are different from the default.
ORACLE allows you to overload procedures, that is, to create several procedures with the same name but that take different arguments. For example, you could have a second stored procedure named pcust that expects the arguments num, orders, and zip. You can call this overloaded procedure by specifying its parameters, num, orders, and zip.
Returning Parameter Values as Arrays
The RUN STORED-PROC statement allows you to return results as an array. To support this feature, you must designate the stored procedure parameter as an extent in the Progress Data Dictionary. Specify the number of elements that you need to accommodate your data.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |