Executing Other Procedures

Topics:

Separating your application code into more than one procedure (called modularizing or partitioning) can significantly speed up your development time and application performance.

The Maintain Data language contains two commands for executing procedures:

These two commands work more or less in the same way. Each command has some options that enable you to do the following:

Advantages of Modularizing Source Code

Separating your application code into more than one procedure has many advantages:

  • You can use multiple procedures to share common source code among many developers, thus speeding up development and maintenance.

    For example, a generalized error message display procedure could be used by all App Studio Maintain Data developers. After passing a message to the generalized procedure, the procedure handles message display. The developers do not need to be concerned about how to display the message and error messages always look consistent to end users.

  • You can remove infrequently-executed source code from a procedure and move it into its own procedure. This reduces the size of the original procedure, simplifying its logic, making maintenance easier, and using less memory if the new procedure is not called.
  • You can split your application into presentation logic and database logic, and then run each type of logic on a server optimized to support that type of logic.

Using the CALL and EXEC Commands

To use the CALL or EXEC command, you must open the calling procedure in the Maintain Data Editor and enter the command inside of a function (CASE/ENDCASE command). You can type the command directly or use the Language Wizard. For more information on the CALL and EXEC commands and syntax, see the WebFOCUS App Studio Maintain Data Language Reference content.

WebFOCUS

Feedback