Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## The dynamic CALL object

> Sometimes you need to be able to run a number of different procedures from the same place in your application. These might be, for example, procedures that handle different values for a parameter or a field in specialized ways.

> You can make the name of a procedure to run a variable by using the `VALUE` function in a `RUN` statement:

>     RUN VALUE(cProcName) (parameters).

> The one significant limitation of this dynamic name is that you must fully specify the parameter list in the source procedure. Therefore, you must use the same dynamic name in all the possible procedures you might run. In some limited cases, you might need to build a general purpose procedure that is prepared to run any procedure with any parameter list. This would certainly not be for ordinary situations, but only for a specialized tool that acts as a gateway for a number of different procedure calls that all must be handled in a consistent way.

> Progress provides a dynamic `CALL` object to handle this need. Using the `CALL` object, you can specify the procedure name, the number of parameters, their types and values, and other information as run-time attributes of this dynamic object, and then invoke it to do the `RUN`. You can also use a dynamic `CALL` object to access object attributes dynamically.

> Because your use of this object is likely to be limited to very special situations, it is not described here. The complete syntax for dynamic `CALL`, along with some simple examples, is in OpenEdge Development: Progress 4GL Reference and online Help.

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