4.18 Function Control Table

The function control table is a table that controls how and when the various functions within a process are used and the ordering sequence that the functions should be in when displayed on the process menu.

Every function defined in a process has an entry in the function control table. It is automatically created with default values when the function is created and cannot be removed. However it can be changed from its default values to suit the specific requirements of a user application of LANSA.

Every entry in the function control table contains the following elements:

The function control table associated with a process called EXAMPLE which has 3 functions called FUNC1, FUNC2 and FUNC3 would look like this before any user changes were made to it:

Func              Dis on   Default

Name   Desc       Menu     Next Func  Allowable next funcs

FUNC1  Function 1 YES      MENU       *ANY

FUNC2  Function 2 YES      MENU       *ANY

FUNC3  Function 3 YES      MENU       *ANY


In the section that dealt with "Creating a new function" a list of "reserved" function names was mentioned. This was a list of function names that were "reserved" for internal LANSA use and could not be used as valid user created function names:


Reserved Meaning / Description


Display process main menu


Exit from LANSA


Display process HELP text


Select next function from list of allowable function


End all batch processing


Return control to calling process or function


Abort process with an error


Any function name


Taking the function control table for process EXAMPLE and the list of reserved function names together it can be seen that what the table is actually specifying to LANSA is:

However, if the function control table for process EXAMPLE was changed as follows:

Func              Dis on   Default

Name   Desc       Menu     Next Func  Allowable next funcs

FUNC1  Function 1 YES      FUNC2      FUNC2

FUNC2  Function 2 NO       FUNC3      FUNC3 FUNC1 SELECT

FUNC3  Function 3 NO       MENU       MENU



The following conditions now apply:

Hopefully this example illustrates the main purpose of the function control table which is to provide a "path" through the functions.

The path may be "enforced" (e.g.: From FUNC1 you must go to FUNC2) or it may be "suggested" (e.g.: from FUNC2 you would normally go to FUNC3, but can go to FUNC1 if desired).