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

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.

Type
*ELEM
Required
Yes
List limit
50
Case
Uppercase
*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

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

Suggested / special values: *LIBL, *CURLIB

Object type Object type

Type
*CHAR
Required
Yes
Length
7
Case
Uppercase

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

Type
*CHAR
Required
Yes
Length
7
Case
Uppercase

Allowed values: *SHRRD, *SHRNUP, *SHRUPD, *EXCLRD, *EXCL

Member, if data base file Member, if data base file

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

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.

Type
*CHAR
Required
No
Default
*JOB
Length
7
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

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.

IBM command documentation

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