4.18.2 What Do the Reserved Functions Do?
The list of function names that are "reserved" and cannot be used as the name of a user defined function has already been described as being the names:
Name |
Reserved Meaning / Description |
MENU |
Display process main menu |
EXIT |
Exit from LANSA |
HELP |
Display process HELP text |
SELECT |
Select next function from list of allowable function |
EOJ |
End all batch processing |
RETRN |
Return control to calling process or function |
ERROR |
Abort process with an error |
*ANY |
Any function name |
While it is not possible to use any of these names as a user created function name it is possible to use any of these names in the process control table.
It is easiest to think of these "reserved" functions as "real" functions that are pre-defined and exist in every process that is created. They can be used in exactly the same way as any user defined function.
The effect of using these "reserved" functions is as follows:
- MENU : Causes the process's main menu to be displayed. The menu will contain an entry for every user defined function in the process, every "reserved" function in the process and any additional menu options. Specifying a "next function" of MENU or using the MENU function key are identical operations.
- EXIT : Causes an immediate exit from the LANSA system. Control is returned to the application that invoked LANSA. Specifying a "next function" of EXIT or using the EXIT function key are identical operations.
- HELP : Causes any process HELP text that exists to be displayed. From this display any associated function or field HELP text can be displayed. Specifying a "next function" of HELP or using the HELP key are identical operations.
- SELECT : Causes a list of all allowable next functions to be displayed. The effect is a "mini menu" of valid next functions. Note that MENU causes all next functions to be displayed whereas SELECT only displays the allowable next functions.
- EOJ : Causes a process executing in a batch environment to end all processing and return control to the application that invoked LANSA. EXIT and EOJ are identical in processing and can be used interchangeably. The EOJ function is provided for convenience only.
- RETRN : Causes the current process to end. Control is returned to the process, function or user application program that invoked the process. Specifying a "next function" of RETRN is equivalent to executing the RETURN command in an RDML program mainline. Refer to the CALL and RETURN commands. for more details of the
- ERROR : Cause a process to end in error and display/print error details. Control is then returned to the application that invoked LANSA. Use in user defined function control tables is not recommended.
- *ANY : is not a function at all. It can only be used in the "allowable next functions" list in a function control table. It is provided to save having to enter the names of all possible next functions when all next functions are valid.