DDS for display files

RETKEY (Retain Function Keys) and RETCMDKEY (Retain Command Keys) keywords

Use these record-level keywords to indicate that function keys or command function/attention keys, which were enabled on a display, should be retained when the record you are defining is displayed.

In most cases, the keys enabled on the display are those which were specified on the last output operation. Additionally, the OS/400 program automatically retains valid keys when a record format sends no data to the display. See CAnn (Command Attention) keyword for display files and CFnn (Command Function) keyword for display files for more information.

Note that if the record previously displayed is defined in another display file, the keys enabled for that record will not be retained when the record you are defining is displayed.

These keywords have no parameters.

RETKEY keyword

RETKEY indicates to retain any CLEAR, HELP, HLPRTN, HOME, PAGEDOWN, PAGEUP, PRINT, ROLLDOWN, and ROLLUP keywords when the record is displayed. You cannot specify RETKEY with a CLEAR, HELP, HOME, PAGEUP, PAGEDOWN, ROLLDOWN, or ROLLUP keyword on the file level or on this record format. PRINT is not allowed on the same record format with RETKEY.

The HLPRTN and PRINT keywords are allowed at the file level with RETKEY. If option indicators are specified on either HLPRTN or PRINT, the state of the indicators when the current record is displayed determines whether the keyword is active.

If you specify HLPRTN on the same record format with RETKEY, the HLPRTN function will not be retained from the previous record.

RETCMDKEY keyword

RETCMDKEY indicates whether to retain CAnn or CFnn keys when the record is displayed. You cannot specify the CAnn or CFnn keywords with the RETCMDKEY on the file level or on this record format. You cannot specify any CAnn, CFnn, SFLDROP, SFLENTER, or SFLFOLD keywords on the record being defined.

Specifying RETKEY and RETCMDKEY keyword

The following must be considered when specifying the RETKEY and RETCMDKEY keywords:

Option indicators are not valid for these keywords.

The following example shows how to specify the RETKEY and RETCMDKEY keywords.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A                                      INDARA
     A          R RECORD1                   CFO1(01 'EXIT SCREEN')
     A                                      CFO2(02 'SET ON IN02')
     A                                      ROLLUP(03)
     A  08                                  CLEAR(03 'CLEAR KEY')
     A                                  1  3'COMPANY NAME'
     A                                  1 25'CF01 TO EXIT'
     A          R RECORD2                   RETKEY
     A                                      RETCMDKEY
     A                                      OVERLAY
     A            FIELD1         4A  B  5  5
     A          R RECORD3                   RETKEY
     A                                      CF01(90 'ALTERNATE CF01')
     A            FIELD1        10A  B  7  5
     A

The records are displayed in the following order: RECORD1, RECORD2, RECORD3.

When RECORD1 is displayed, CF01, CF02, Clear, and Page Up keys are activated. The same keys are valid for RECORD2, since RETKEY and RETCMDKEY are specified. Since RECORD3 specifies RETKEY, the Clear and Page Up keys are valid. CF01 has been redefined for this record. CF02 is not valid for this record.

Note:
The retain function does not require the record format to be displayed. (RECORD3 uses function keys defined in RECORD1, but since no OVERLAY keyword is specified in RECORD3, the display is erased prior to displaying RECORD3.)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]