Setting the Execution Order

In this section:

This section describes the order in which the server searches for and runs stored procedures. Understanding the execution order enables you to set it appropriately.

The server has a default search order. To change this order:


Top of page

x
Valid EXORDER Settings

How to:

The following table describes valid settings for the execution order.

The recommended setting is either:

Either setting ensures that both the Procedure Library and Program Library are searched, providing you with the most flexibility.

Setting

Library Searched

Comments

SET EXORDER=FEX

Procedure Library only.

This setting is the default.

SET EXORDER=PGM

Program Library only.

 

SET EXORDER=FEX/PGM

Procedure Library first, followed by Program Library.

If the call is to a program, the name of the program cannot be the same as the name of a Dialogue Manager procedure in search path of the server. If it is, the server will find the Dialogue Manager procedure in the Procedure Library and execute it, rather than executing the program.

SET EXORDER=PGM/FEX

Program Library first, followed by Procedure Library.

If the call is to a Dialogue Manager procedure, the name of the procedure cannot be the same as the name of a program in the search path of the server. If it is, the server will find the program in the Program Library and execute it, rather than executing the Dialogue Manager procedure.



x
Syntax: How to Query the Execution Order

Issue the following Dialogue Manager command to query the current setting of EXORDER:

? EXORDER

Top of page

x
Execution Order of Stored Procedures From Dialogue Manager

In this section:

This section describes the execution order used by the server to locate and run stored procedures called from Dialogue Manager.



x
Using CALLPGM

If you use explicit CALLPGM syntax in a Dialogue Manager procedure to call a stored procedure, the server recognizes that the stored procedure is a compiled program, and uses IBICPG or the existence of EDACONF in the user directory to locate the procedure with no need to set EXORDER.



x
Using EXEC

If you use EXEC in a Dialogue Manager procedure to call a stored procedure, the server adheres to the setting of the execution order specified by SET EXORDER, since EXEC could be calling either a compiled program or a Dialogue Manager procedure.



x
Using CALLIMS or CALLITOC

The CALLIMS and CALLITOC programs contain Dialogue Manager procedures (called CALLIMS and CALLIMSC) to front-end the underlying stored procedures. If you use the CALLIMS or CALLITOC programs directly from a Dialogue Manager procedure, the server recognizes that you are calling a compiled program, and IBICPG does not need to be set.


iWay Software