Command reference / prog
DLTPGM
Delete Program
Deletes a compiled program or a group of programs. If the program is running when the command is issued, its processing ends abnormally, unless a specific ALCOBJ command is in effect in another job. Any high-level language or CL program can be deleted.
Allowed environments: *ALL.
Positional parameters: 1.
Restrictions
- Requires *OBJEXIST authority to the program and *EXECUTE authority to the library that contains it.
- If the program is being debugged, an implicit reference to it (for example, CHGVAR with PGM(*DFTPGM)) can cause a function check. Remove the program from the debug session with RMVPGM first. To recompile a program while in debug mode, remove it with RMVPGM, delete it with DLTPGM, recompile, then add it back with ADDPGM.
Parameters
PGM
Program
Names the program to delete. A specific or generic program name may be given, and either form can be qualified with a library name. This parameter is required.
*LIBL- Searches every library in the thread's library list until the first match is found.
*CURLIB- Searches the job's current library. If no current library is in the library list, QGPL is used.
*USRLIBL- If a current library entry exists, searches the current library and the user portion of the library list. Otherwise searches only the user portion.
*ALL- Searches all libraries in the system, including QSYS.
*ALLUSR- Searches all user libraries: those whose names do not begin with Q, except certain IBM development libraries such as #COBLIB and #RPGLIB, plus several Q-prefixed libraries that hold frequently changing user data, such as QGPL and QSYS2.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Program
Program
Library
Library
Suggested / special values:
*LIBL, *CURLIB, *USRLIBL, *ALL, *ALLUSR
Examples
DLTPGM PGM(LIB1/PROG1)
Deletes program PROG1 from library LIB1, provided the user has the proper authority for the program and library.
Generated from os/cl/catalog/DLTPGM.json and os/cl/help/DLTPGM.json.