6: Creating the Demonstration System Menu

6.3 Modifying a Menu

The menu which you’ve just created may be modified to display the data entry screen choices in one column and the report choices in a second column. Adding another command to a menu choice’s Choice Commands field will also be demonstrated in this section.

To modify a menu, select choice D2 - Modify Application Menu from the Menus Menu.

Nothing on this screen needs to be changed so press the SWITCH key <F7> to display the menu screen.

First, position the cursor directly on the D in Demonstration and press the Space Bar until you have completely erased Demonstration Subscription System. Next, press the Backspace key until the cursor is repositioned to column 1 of the top line and type, Demonstration Subscription System.

Using the Arrow keys, move the cursor to the third row directly under the D in Demonstration, and type:

Next, move the cursor to column 48 of the same line (by pressing the Tab key four times) and type:

The menu choices may be moved freely about on the screen by first deleting them from their old position and then undeleting them in their new position. We will start by moving the first menu selection, 1 - Enter Magazines. Begin by placing the cursor anywhere on that selection. It should now appear in reverse video. Next, use the DELETE function to delete the choice by pressing the GOLD key <F1> followed by the D key. Move the cursor to the right until it is lined up with the D in Data Entry Screens. Press the GOLD key <F1> followed by the U key to UNDELETE the menu selection.

Move the rest of the menu selections to their new locations on the screen by using the method described in the preceding paragraph.

Check the keyboard to see if it has keys that provide the functions: character insert, character delete, line insert, and line delete. If any of these keys are present, and are properly defined, they may also be used in rearranging the menu screen. For example, if there is an <Pg Up> key, place the cursor on the line displaying the menu choice X - exit. Now press the <Pg Up> key. This action causes a line to be inserted directly above X - exit, thus moving this menu selection down one line. Place the cursor on the newly inserted line and press the <Pg Dn> key. Observe that the X - exit selection has moved back to its original position. (Note: A line that contains a menu choice cannot be deleted by using the <Pg Dn> key. In order to do so, the menu choice must first be deleted by positioning the cursor on the choice and then pressing the GOLD key <F1> followed by the D key.)

The last change to be made to our menu is to add a Choice Command to choice 3 - List Subscribers. Position the cursor on this choice and press the UPDATE key <F4>. The Choice Description screen is now displayed. Type:

on the second line of the Choice Commands field.

The command we’ve just added forces a non-zero exit status which causes a pause to occur immediately after the preceding Choice Commands have been executed. The RETURN key must then be pressed before the menu is redisplayed. This is often useful when execution of the Choice Commands causes information to be displayed on the screen that would normally be overwritten were a menu to be immediately redisplayed. Store this change by pressing the STORE key <F5>. The menu screen is redisplayed.

At this point, another menu choice could be updated or added, or the screen itself could be rearranged. You could also redisplay the Menu Description screen by pressing the SWITCH key <F7>, at which point a secondary menu might be added. This new menu (perhaps containing a selection of commonly used operating system commands) could be accessed from within the first menu by means of the menu command, and vice versa.

Once all of the necessary changes have been made, press the EXIT key <F8> to write the menu to its file and return to the Menus Menu.