Use When Appropriate

Although EXEC is used for almost any possible reason, its most common use is for populating stacks for combo and list boxes in the presentation logic. EXEC is used with a TABLE request coded in the FOCEXEC called by a remote procedure. This is advantageous because in many cases, TABLE can retrieve a single column of multiple rows of data faster and more efficiently than Maintain. However, the cost of connecting to another agent can sometimes negate the advantages of EXEC/TABLE.

Using EXEC can also make sense in the early stages of development. For example, it may be very easy to create or utilize an existing piece of code with an EXEC to get the application working, or a concept or prototype realized. As you near completion of your application and begin tuning it for ultimate performance, you may find that the cost or attributes of using EXEC (for example, an additional agent, additional connections, and so on) warrants the re-implementation of this logic in Maintain.


WebFOCUS