Menu Bar Sample Programs

Two sample COBOL programs called menubar and menubar2 are included on the media sent to you from Micro Focus. We do not recommend either of these routines for use with the current version of the compiler, but we provide them for upward compatibility at sites that have used previous versions of our compiler.

Earlier versions of the compiler came with the sample program menubar that demonstrates how to implement a two-dimensional menu bar in COBOL. The only difference between the menubar program on your media and the original program is that it has been enhanced to support the mouse.

Also included is a variation of the menubar program. This is called menubar2. This variation uses the W$MENU routine to implement its menus. The result is that the menu is implemented by the host if you are running on a graphical system such as Windows. If you desire, you may replace menubar with menubar2. This allows you to convert applications that use menubar to start using graphical menus quickly. menubar2 cannot substitute for all uses of menubar. See the comments in menubar2 for restrictions.

Although these routines are included for compatibility with previous versions of the compiler, we recommend that you avoid using menubar and menubar2 where possible. When you use these programs, the user can select menu items only when the program asks for them. This is the program-driven model of a menu system. Normally, with a graphical user interface, the menus are always active and items can be selected at any time. This is the user-driven menu model. Generally speaking, your users will expect to be able to use the menu at any time. You should try to provide this where possible by using the newest menu features in the compiler