Figure 206 shows how to specify the MNUBARDSP keyword on a record that is not a menu bar.
Figure 206. Specifying the MNUBARDSP Keyword (Example 1)
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R RECORD1 A 01 MNUBARDSP(MENURCD &MNUCHOICE &INPUT); A FIELD1 10A B 10 12 A FIELD2 5S 0B 14 12 A MNUCHOICE 2Y 0H A INPUT 2S 0H A R MENURCD MNUBAR A F1 2Y 0B 1 2 A MNUBARCHC(1 PULLFILE 'File') A : A : A
In this example, if option indicator 01 is on when record RECORD1 is written to the display, the system displays the menu bar in record MENURCD. When the menu bar is activated and the pull-down menu is selected, the number of the menu-bar choice is returned in field MNUCHOICE. If the pull-down menu selected contains one single-choice selection field, the choice made for that field is returned in field INPUT. Otherwise, field INPUT contains -1, indicating that the application must read the pull-down record to receive the pull-down input.
Figure 207 shows how to specify the MNUBARDSP keyword on a menu-bar record.
Figure 207. Specifying the MNUBARDSP Keyword (Example 2)
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R MENURCD MNUBAR A 01 MNUBARDSP A F1 2Y 0B 1 2 A MNUBARCHC(1 PULLFILE 'File') A : A : A
If option indicator 01 is on when record MENURCD is written to the display, the system displays the menu bar defined in MENURCD. If the user selects a pull-down menu from the menu bar, the number of the menu-bar choice selected is returned in F1 field.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.