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

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.

Type
*QUAL
Required
Yes
Case
Uppercase
*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

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/DLTPGM.json and os/cl/help/DLTPGM.json.