DLTMNU (Delete Menu)
Purpose
The Delete Menu (DLTMNU) command deletes the specified menu from the system. Note that this command does not delete the display and message files associated with a Display File (*DSPF) menu, nor does it delete the programs associated with a Program (*PGM) menu.
Restriction: The user must have *OBJEXIST authority for the menu and *USE authority for the library that contains the menu to use this command.
Required Parameters
- MENU
- Specifies the qualified name of the menu being deleted. A particular menu or a generic menu can be specified, and either type can be optionally qualified by a library name.
The name of the menu can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
*USRLIBL: Only the libraries in the user portion of the job's library list are searched.
*ALL: All libraries in the system, including QSYS, are searched.
library-name: Specify the name of the library to be searched.
menu-name: Specify the name of the menu being deleted.
generic*-menu-name: Specify the generic name of the menu being deleted. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. If the complete object name is specified, and multiple libraries are searched, multiple objects can be deleted only if *ALL or *ALLUSR library values can be specified for the name. For more information on the use of generic names, refer to generic names.
Optional Parameters
- DLTREFOBJ
- Specifies that the display file, message file, or program objects referenced by a menu are deleted. Only the *DSPF menu type specified on the CRTMNU command can reference a display file or a message file, and only the *PGM program type specified on the CRTMNU command can reference a program.
*NONE: The objects referenced by the menu are not deleted.
*ALL: All display file, message file, and program objects that are referenced by the menu are to be deleted.
A maximum of three of the following values can be specified:
*DSPF: The display file that is referenced by the menu is to be deleted.
*MSGF: The message file that is referenced by the menu is to be deleted.
*PGM: The program that is referenced by the menu is to be deleted.
Examples for DLTMNU
Example 1: Deleting the Menu Only
DLTMNU MENU(FINLIB/ARMENU)This command deletes the menu named ARMENU from the library named FINLIB.
Example 2: Deleting the Display and Message File
DLTMNU MENU(EXLIB/TEST) DLTREFOBJ(*DSPF *MSGF)This command deletes the menu named TEST from the library named EXLIB. It also deletes the display file and message file associated with the menu named TEST.
Error messages for DLTMNU
*ESCAPE Messages
- CPF2105
- Object &1 in &2 type *&3 not found.
- CPF2107
- Library not cleared or deleted. Function check occurred.
- CPF2110
- Library &1 not found.
- CPF2113
- Cannot allocate library &1.
- CPF2114
- Cannot allocate object &1 in &2 type *&3.
- CPF2117
- &4 objects type *&3 deleted. &5 objects not deleted.
- CPF2125
- No objects deleted.
- CPF2160
- Object type *&1 not eligible for requested function.
- CPF2176
- Library &1 damaged.
- CPF2182
- Not authorized to library &1.
- CPF2189
- Not authorized to object &1 in &2 type *&3.