Delete SQL Package (DLTSQLPKG)
Where allowed to run: All environments (*ALL)
Threadsafe: NoParameters
Examples
Error messagesThe Delete Structured Query Language Package (DLTSQLPKG) command is used to delete an SQL package or group of packages.
DLTSQLPKG is a local command and must be used on the iSeries system where the SQL package being deleted is located.
To delete an SQL package on a remote system that is also an iSeries system, use the Submit Remote Command (SBMRMTCMD) command to run the DLTSQLPKG command on the remote system.
The user can do the following to delete an SQL package from a remote system that is not an iSeries system:
- Use interactive SQL to run the CONNECT and DROP PACKAGE operations.
- Sign on the remote system and use a command local to that system.
- Create and run an SQL program that contains a DROP PACKAGE SQL statement.
Restrictions:
- You cannot use the DLTSQLPKG command to delete an SQL package on a remote system. To delete an SQL package from a remote system, you can do one of the following:
- Use interactive SQL to run the CONNECT and DROP PACKAGE statements.
- Sign on the remote system and use a command local to that system.
- Create and run an SQL program which contains a DROP PACKAGE SQL statement.
- You must have object existence (*OBJEXIST) authority for the SQL package and read (*READ) authority for the library where the SQL package is located to use this command.
Top
Parameters
Keyword Description Choices Notes SQLPKG SQL package Qualified object name Required, Positional 1 Qualifier 1: SQL package Generic name, name Qualifier 2: Library Name, *LIBL, *CURLIB, *USRLIBL, *ALL, *ALLUSR
Top
SQL package (SQLPKG)
Specifies the SQL package to be deleted. Multiple SQL packages can be deleted by specifying a generic SQL package name.
Qualifier 1: SQL package
- generic-name
- Specify the generic name of the SQL packages to be deleted. A generic name is a character string of one or more characters followed by an asterisk (*).
- name
- Specify the name of the SQL package to be deleted.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library is searched. If no library is specified as the current library for the job, QGPL is used.
- *USRLIBL
- If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched.
- *ALL
- All libraries in the system, including QSYS, are searched.
- *ALLUSR
- All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:
#CGULIB #DSULIB #SEULIB #COBLIB #RPGLIB #DFULIB #SDALIBAlthough the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:
QDSNX QRCLxxxxx QUSRIJS QUSRVxRxMx QGPL QSRVAGT QUSRINFSKR QGPL38 QSYS2 QUSRNOTES QMGTC QSYS2xxxxx QUSROND QMGTC2 QS36F QUSRPOSGS QMPGDATA QUSER38 QUSRPOSSA QMQMDATA QUSRADSM QUSRPYMSVR QMQMPROC QUSRBRM QUSRRDARS QPFRDATA QUSRDIRCL QUSRSYS QRCL QUSRDIRDB QUSRVI
- 'xxxxx' is the number of a primary auxiliary storage pool (ASP).
- A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
- name
- Specify the name of the library to be searched.
Top
Examples
DLTSQLPKG SQLPKG(JONES)This command deletes the SQL package JONES.
Top
Error messages
None
Top