Previous Topic: Naming MenusNext Topic: Menu Features


Storing Menus

Toolkit menus are stored in a data base file member. Many different menus can be stored in a single member, and a menu file can contain many members. When you refer to a menu, you may optionally also specify a name of the file and member containing the menu. For example:

YGO MENU(FRED) FILE(FREDSMENU) MBR(FREDERICK)

You can keep different sets of menus for different users in different files, and control access to the menus by granting or revoking authorization rights to the files.

A default menu file is supplied with the Toolkit shipped system; it is named YDSNMNU. You can create your own copies of the menu file and give them any name you like, but each copy must have the same format as the shipped YDSNMNU file. The Toolkit command Create Design File (YCRTDSNF) is provided to give you an easy method of creating new menu files. For example, to create a menu file in library QGPL:

YCRTDSNF TYPE(*MNU) FILE(QGPL/YDSNMNU)
TEXT(‘Menus for my system’)

The recommended name for Toolkit menu files is YDSNMNU because it is the default name for the menu file on all the Toolkit commands that use menus. It is suggested that you call all your menu files YDSNMNU, and control which version you use using the library list. Menus within a menu file member can be regarded as analogous to source members within an i OS source file, such as QRPGSRC.

You may have different sets of menus in different members in the design file. The Toolkit command Add Design File Member (YADDDSNFM) is provided to give you an easy method of adding additional members to design files. For example, to add a new member to menu file in library QGPL:

YADDDSNFM TYPE(*MNU) FILE(QGPL/YDSNMNU) MBR(EXTRA) TEXT