Progress
Version 9
Product Update Bulletin


Using Dynamic Invoke Only When Necessary

The "4GL Elements Related To Dynamic Invoke" section lists the 4GL elements that dynamic invoke involves. As you can see, the list is long.

Besides involving more 4GL elements, dynamic invoke requires more lines of code. Table J–3 shows the code required to invoke an external procedure dynamically and statically.

Table J–3: Invoking hello.p Dynamically and Statically
Dynamic Invoke
Static Invoke
DEFINE VARIABLE hCall AS HANDLE. 
CREATE CALL hCall. 
/*invoke hello.p nonpersistently */ 
hCall:CALL-NAME = "hello.p". 
hCall:NUM-PARAMETERS = 1. 
hCall:SET-PARAMETER( 1, "CHARACTER", 
"INPUT", "HELLO WORLD"). 
hCall:INVOKE. 
/* clean up */ 
DELETE OBJECT hCall. 
RUN hello.p("HELLO WORLD"). 

As Table J–3 illustrates, performing this task using dynamic invoke requires many more lines of code than does doing it with static invoke.

NOTE: For more information on this code, see the "Example 1 — Invoking an External Procedure Nonpersistently" section.

For this reason, Progress Software Corporation recommends that you use dynamic invoke only when using static invoke is impossible.

Specifically, use dynamic invoke in the following situations:


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