Release 10.1A: OpenEdge Development:
ProDataSets

> ## Passing a ProDataSet with BY-REFERENCE or BIND

> Similarly to how temp-tables are passed as parameters, Progress passes the ProDataSet by value, by default. That is, Progress copies the ProDataSet definition and all the data in its temp-tables from one procedure to the other. This is true whether the call is to another procedure in the same Progress session, or in a separate Progress session on the other side of an AppServer connection. The overhead of doing this can be quite high and should be avoided wherever possible.

> When you pass a ProDataSet to a remote session, Progress has no choice but to copy the data from one session to the other. However, when you pass a ProDataSet as a parameter locally, you can optimize the call by including the `BY-REFERENCE` or `BIND` keyword on the parameter in the `RUN` statement, as shown in the following syntax examples:

> Syntax
>     RUN procedure ( [ INPUT | OUTPUT | INPUT-OUTPUT ] DATASET dataset-name
>       [ APPEND ] [ BY-VALUE | BY-REFERENCE | BIND ] ).

> Syntax
>     RUN procedure ( [ INPUT | OUTPUT | INPUT-OUTPUT ] DATASET-HANDLE handle-var
>       [ APPEND ] [ BY-VALUE | BY-REFERENCE | BIND ] ).

> Passing a ProDataSet to a local routine using the `BY-REFERENCE` or `BIND` keyword allows the calling routine and the called routine to access the same ProDataSet instance, instead of copying the ProDataSet, and thereby provides a significant performance advantage.

> When the call is remote, Progress ignores the `BY-REFERENCE` and `BIND` keywords and passes the ProDataSet by value, as it must in this case.

> For more information about using the `BY-REFERENCE` and `BIND` keywords, see the parameter definition syntax and parameter passing syntax reference descriptions in the OpenEdge Development: Progress 4GL Reference .

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