Command reference / object
DLCOBJ
Deallocate Object
Releases the allocations of the specified objects, which were allocated earlier by ALCOBJ commands, so other jobs or threads can use them. If no lock exists, no error occurs. If DLCOBJ is not used, job-scoped locks are released when the job ends and thread-scoped locks when the thread ends. Lock-space-scoped locks are not released automatically. Do not use DLCOBJ on an object that was not explicitly allocated with ALCOBJ, because it releases internal locks and can make the object deletable. To release several locks on one object, repeat the object name, type and lock state for each lock.
Allowed environments: *ALL.
Positional parameters: 1.
Restrictions
- Cannot be used to deallocate a device description (*DEVD) for an APPC or INTRA device.
- Only physical files, logical files, distributed files and DDM files can be deallocated as *FILE. A distributed file deallocates its piece on each node. A DDM file deallocates both the local DDM file and the remote file it identifies.
- In multithreaded jobs, not threadsafe for distributed files or for DDM files of type *SNA.
Parameters
OBJ
Object specifications
Specifies the qualified name, object type, lock state and, for a database or DDM file, the member of each object to deallocate. Up to 50 values can be given, and this parameter is required. Only some object types are allowed, and some do not support every lock state.
*LIBL- All libraries in the thread's library list are searched until a match is found.
*CURLIB- The current library for the thread is used. If none is set, QGPL is used.
*SHRRD- The lock state is shared for read.
*SHRNUP- The lock state is shared, no update.
*SHRUPD- The lock state is shared for update.
*EXCLRD- The lock state is exclusive, allow read.
*EXCL- The lock state is exclusive, no read.
*FIRST- The first member of the database file is deallocated.
Elements in order
Object
Object
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Library
Library
Suggested / special values:
*LIBL, *CURLIB
Object type
Object type
Allowed values:
*AUTL, *BNDDIR, *CLD, *CRQD, *CSI, *CSPMAP, *CSPTBL, *DEVD, *DTAARA, *DTADCT, *DTAQ, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *IMGCLG, *IPXD, *LIB, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODULE, *MSGQ, *NODL, *NTBD, *NWSCFG, *NWSD, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *SBSD, *SCHIDX, *SQLPKG, *SQLXSR, *SRVPGM, *SSND, *S36, *TIMZON, *USRIDX, *USRQ, *USRSPC, *VLDL, *WSCST
Lock state
Lock state
Allowed values:
*SHRRD, *SHRNUP, *SHRUPD, *EXCLRD, *EXCL
Member, if data base file
Member, if data base file
Suggested / special values:
*FIRST
SCOPE
Lock scope
Specifies the scope of this lock request. It must match the scope of the locks currently allocated for the job or thread.
Allowed values:
*JOB, *THREAD, *LCKSPC
*JOB- The lock is scoped to the job.
*LCKSPC- The lock is scoped to the lock space attached to the current thread. If no lock space is attached, the lock is scoped to the job.
*THREAD- The lock is scoped to the thread.
MIRROR
Mirror
Specifies the action to take if the object is replicated by Db2 mirror. This is supported only for database files, data areas, user spaces and user indexes, and is ignored for other objects.
Allowed values:
*YES, *NO
*YES- The command is run on both the source and target nodes.
*NO- The command is run only on the source node. The request is not replicated to the target node.
Examples
DLCOBJ OBJ((LIBB/FILEA *FILE *SHRRD))
Releases the shared-for-read allocation of the first member of file FILEA in library LIBB that was held by the job.
DLCOBJ OBJ((LIBY/DATAAREAX *DTAARA *SHRRD)) SCOPE(*THREAD)
Releases the shared-for-read allocation of data area DATAAREAX in library LIBY that was held by the thread.
Generated from os/cl/catalog/DLCOBJ.json and os/cl/help/DLCOBJ.json.