Figure 210 shows how to specify the MNUCNL keyword:
Figure 210. Specifying the MNUCNL Keyword
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A MNUCNL(CA12 12) 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
In this example, CA12 is defined as the cancel key for all records in the file. If CA12 is pressed while the pull-down menu, PULLEDIT, is displayed, the pull-down menu is canceled. If CA12 is pressed while the cursor is located on the menu bar (no pull-down menus are displayed), the menu bar is canceled and the cursor is moved back to the application record. If CA12 is pressed while the cursor is not located on the menu bar and no pull-down menu is displayed, response indicator 12 is set on and control is returned to the application program.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.