12.9 SAA/CUA Function Key Use

In SAA/CUA partitions it is recommended that the EXIT_KEY and MENU_KEY parameters of the LANSA RDML commands DISPLAY, REQUEST and POP_UP be examined closely before attempting to design or implement a system.

In an SAA/CUA partition there are 2 different types of EXIT key enabled. The first is called a "high exit" and the second is called a "low exit". They are both usually assigned to function key 3.

LANSA defines the EXIT_KEY parameter as a "high exit" by default. When used, a high exit causes an exit from the entire application system to occur (unless specifically trapped by the calling routine(s)).

However, on any individual DISPLAY, REQUEST or POP_UP RDML command you can specify that a "low exit" is required, and that when it is used, control should be returned to the routine that invoked the routine containing the DISPLAY, REQUEST or POP_UP command.

The routine to which control is returned may be the calling RDML function, the program mainline, or even another subroutine.

LANSA also defines a standard function key called the MENU key (usually function key 12). It is often referred to in SAA/CUA partitions as the CANCEL key.

By default, use of the MENU/CANCEL function key causes the executing RDML function to end and the last menu that was displayed to be re-displayed.

However, on any individual DISPLAY, REQUEST or POP_UP RDML command you can specify the current function should be cancelled and that control should be returned to the routine that invoked the routine containing the DISPLAY, REQUEST or POP_UP command.

Again, the routine to which control is returned may be the calling RDML function, the program mainline, or even another subroutine.

As a general rule, in "mainline" programs (that is, those directly accessible from menus) use the following values for the EXIT_KEY and MENU_KEY parameters:

EXIT_KEY(*YES *EXIT *HIGH)

or

EXIT_KEY(*YES)

MENU_KEY(*YES *MENU)

or

MENU_KEY(*YES)

 

Similarly, in "subroutine" programs (ie: those that perform services for calling programs / routines) the following values for the EXIT_KEY and MENU_KEY parameters are recommended:

EXIT_KEY(*NO)

or

EXIT_KEY(*YES *RETURN *LOW)

MENU_KEY(*YES *RETURN)

 

While there is no real need to exactly follow these requirements, what is important is that an application standard for EXIT and MENU function keys is established before one single RDML program is written and is understood and adhered to by all programs and programmers.