MNUBARSW (Menu-Bar Switch Key) Keyword for Display Files--Example

Figure 209 shows how to specify the MNUBARSW keyword:

Figure 209. Specifying the MNUBARSW Keyword

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A                                      MNUBARSW(CA10)
A          R MENUBAR                   MNUBAR
A            MNUFLD         2Y 0B  1  2
A                                      MNUBARCHC(1 PULLFILE +
A                                          '>File        ')
A  01                                  MNUBARCHC(2 PULLEDIT +
A                                          '>Edit        ')
A
A          R PULLEDIT                  PULLDOWN
A            F1            1D 0B  1   2RANGE(1 3)
A                                  1  5'1. Undo        '
A                                  2  4'2. Mark        '
A                                  3  4'3. Copy        '
A            :
A            :
A          R APPSCR                    MNUBARDSP(MENUBAR &MNUCHOICE);
A            FIELD1        10A  B 10 12
A            FIELD2         5S 0B 14 12
A                                 24  1'F12=Cancel '
A            MNUCHOICE      2S 0H
A

In this example, CA10 is defined as the Switch-to-menu-bar key for all records in the file. When the cursor is located anywhere except in the menu bar and CA10 is pressed, the cursor is moved to the File choice on the menu bar. If CA10 is pressed again while the cursor is located anywhere in the menu bar, the cursor is moved back to its previous location within the APPSCR record.