The dynamic CALL object
- Last Updated: May 8, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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:
|
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.
ABL 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 object, along with some simple examples, is in the ABL Reference.