Release 10.1A: OpenEdge Data Management:
DataServer for ODBC

> ## 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 a stored procedure, request them with the keyword `OUTPUT` or `INPUT–OUTPUT` when you execute the procedure. When you run a stored procedure in a DataServer application, the parameters are supplied and passed using OpenEdge data types.

> The following 4GL procedure uses the second option for passing parameters—it passes them by name with the `PARAM` option:

>     /* Parameters by name */

>     RUN STORED-PROC pcust (PARAM num = 20, output PARAM states = 0,
>      output PARAM orders = 0).
>     FOR EACH proc-text-buffer:
>      DISPLAY proc-text-buffer.
>     END.
>     CLOSE STORED-PROC pcust.
>     DISPLAY pcust.orders pcust.states.

> When you use `PARAM` to specify parameter names, you do not have to specify all parameters for the stored procedure. Instead, you can include only those parameters you want to use, in any order you choose. 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 name them when you want to pass values that are different from the default.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095