Compiling a MODIFY Request

How to:

Reference:

The COMPILE command translates a MODIFY request stored in a FOCEXEC into an executable code module. This module, like an object code module, cannot be edited by a user. However, it loads faster than the original request because the MODIFY commands have already been interpreted by FOCUS (the initialization time of a compiled MODIFY module can be four to ten times faster than the original request). Compiling a request can save a significant amount of time if the request is large and must be executed repeatedly. You compile the request once, and execute the module as many times as you need it.

Enter the COMPILE command at the FOCUS command level (the FOCUS prompt). To execute/run this module, use the RUN command from the FOCUS command level.

Syntax: How to Compile a MODIFY Request

COMPILE focexec [AS module]

where:

focexec

Is the name of the FOCEXEC where the request is stored.

module

Is the name of the module. The default is the FOCEXEC name. FOCEXEC names and module names are system dependent.

Syntax: How to Execute a Module

RUN module

where:

module

Is the name of the module.

You will see no difference in execution between the module and the original request, but it will load much faster.

Reference: Considerations for Compiling a MODIFY Request

The following are considerations for compiling a MODIFY request:

  • The FOCEXEC procedure to be compiled may only contain one MODIFY request. It may not contain any other FOCUS, Dialogue Manager, or operating system commands.
  • Before compiling a request or executing a module, allocate all input and output files such as transaction files and log files. These allocations must be in effect at run time.
  • Before compilation, issue any SET, USE, COMBINE, or JOIN commands necessary to run the request.
  • If the data source you are modifying is joined to another file (using the JOIN command) during compilation, it must be joined to the file at run time.
  • If you are modifying a combined structure (using the COMBINE command), the structure must be combined both at compilation and at run time.
  • FOCEXECs prompt for Dialogue Manager variable values at compilation time. These values cannot be changed at run time.
  • If you are using FOCUS security to prevent unauthorized users from executing the request, the password you set at compilation time must be the same one set at run time.

Information Builders