7 3 The PROMPT_KEY Parameter

LANSA Application Design

7.3 The PROMPT_KEY Parameter

The commands DISPLAY, REQUEST and POP_UP all have a parameter called PROMPT_KEY. The default value for this parameter looks like this:

                     PROMPT_KEY(*DFT *AUTO)

The first value in the parameter indicates whether or not the prompt key should be enabled. Allowable values are *YES, *NO and *DFT. The special value *DFT indicates that it should be enabled or disabled according to byte 477 of the system definition data area DC@A01. For full details of the layout of the system definition data area refer to The System Definition Data Areas in the LANSA for iSeries User Guide.

The second value indicates what should happen when the prompt key is used. Allowable values are *NEXT (control should pass to the next RDML command), a command label (indicating that control should be passed to the label) or *AUTO (which indicates that the function key should be handled automatically by LANSA).

In the first two cases (*NEXT or a label) the prompt key handling is controlled entirely by the RDML program, and thus what happens is entirely at the discretion of the programmer.

It is the final case, (*AUTO) that is of interest here. Most of the following material discusses how the prompt key is handled automatically.

Finally, the actual function key number assigned to the prompt key is set like this

  • In non-SAA/CUA applications it is assigned from bytes 478 - 479 of the system definition data area. Refer to The System Definition Data Areas in the LANSA for iSeries User Guide for full details of the system definition data area.
  • In SAA/CUA applications it is assigned from the partition level value assigned to the prompt function key. Refer to Creating or Changing System Partition Definitions in the LANSA for iSeries User Guide for more details of how and when this value is assigned.