Using the CALL and EXEC Commands

In this section:

How to:

To use the CALL or EXEC command, you must open the calling procedure in the Procedure Editor and enter the command inside of a function (CASE/ENDCASE command). You can type the command directly or use the Language Wizard.


Top of page

x
Syntax: How to Use the CALL and EXEC Commands

The syntax for CALL is:

CALL Maintain_procedure [AT server] [KEEP|DROP] [PATH {VAR|LIST}] [FROM 
var_list] [INTO var_list] [;]

The syntax for EXEC is:

EXEC WebFOCUS_procedure [AT server] [KEEP|DROP] [PATH {VAR|LIST}] [FROM 
var_list] [INTO var_list] [;]

CALL is for Maintain procedures; EXEC is for WebFOCUS procedures. The optional parameters for this command enable you to do the following:

AT server

Specifies the WebFOCUS Server where the procedure resides. For more information, see Executing a Procedure on Another Server: AT Server.

KEEP|DROP

Determines the behavior of the server when the procedure finishes executing. KEEP is the default value. For more information, see Keeping or Terminating the Server Session: KEEP/DROP.

FROM

Enables you to receive parameters from the called procedure. For more information, see Passing Parameters Between Maintain Procedures: FROM...INTO and Passing Parameters Between Maintain and WebFOCUS Procedures: FROM…INTO.

INTO

Enables you to pass parameters to the called procedure. For more information, see Passing Parameters Between Maintain Procedures: FROM...INTO and Passing Parameters Between Maintain and WebFOCUS Procedures: FROM…INTO.


Top of page

x
Optional PATH Keyword for CALL and EXEC Statements

How to:

When issuing a CALL or EXEC statement, the optional PATH keyword is used to specify additional locations (search paths) the system should use when searching for dependent resources (Master files, imported modules, and so on). The path location names are application names existing within the APPROOT directory structure or application names that have been introduced with the APP MAP command.

The search path value can be in the form of a Maintain variable or list of literal values enclosed in quotes, as follows:

CALL Procedure AT server PATH "AppDir1 AppDir2 AppDir3" ;
EXEC Procedure AT server PATH MyVariable ;


x
Procedure: How to Introduce a PATH Keyword Into a CALL or EXEC Statement

The Developer Studio deployment process can also introduce the PATH keyword into a CALL or EXEC statement. This is done by the deployment scenario editor, which provides a dialog box to control what values are used for the application path. To access this dialog box:

  1. Open the deployment scenario editor.
  2. Right-click the server folder under Available Servers.
  3. Select Set Server Paths from the menu. The following dialog box appears.

Set Running Paths dialog box

Items included in the Running Paths list appear as PATH values for those procedures that are invoked with the CALL or EXEC statements on the selected WebFOCUS Environment.


WebFOCUS