Use the CLEAR
command to remove active
LOCKs.
![]() | |
FIS recommends restricting the use of the LKE CLEAR facility to debugging environments; removing LOCKs in a production environment typically violates application design assumptions and can cause aberrant process behavior. GT.M automatically removes abandoned LOCKs so it is typically safer to MUPIP STOP a process that is inappropriately hanging on to a LOCK. |
The format of the CLEAR
command is:
C[LEAR] [-qualifier...]
The optional qualifiers are:
-A[LL] -L[OCK] -[NO]C[RIT] -[NO]EXACT -[NO]I[NTERACTIVE] -O[UTPUT]="file-name" -P[ID]=pid -R[EGION]=region-name
By default, CLEAR operates interactively
(-INTERACTIVE
).
Qualifiers for CLEAR
-A[LL]
Specifies all current LOCKs.
-ALL removes all current LOCKs.
If used, CLEAR
and -REGION
qualifier, -ALL
removes all LOCKs in that
region.
Issue a CLEAR - ALL
only when there are no
active GT.M processes using LOCKs, or when you can predict the
effect on the application.
By default, CLEAR -ALL
operates interactively
(-INTERACTIVE
).
-[NO]C[RIT]
Allows LKE CLEAR
to work even if another process is
holding a critical section.
![]() | |
This can damage current LOCKs and the LOCK mechanism. It is intended for use only under the direction of FIS. |
By default LKE operates in CRIT mode and ensures a consistent view of LOCKs by using the database critical section(s).
-[NO]EXACT
Limits the CLEAR command to the exact resource name specified
with -LOCK=
resource_name
. NOEXACT (the default) treats the specified resource name as a prefix and works not only on it, but also on any of its descendants, since their existence effectively LOCK their parent tree.
-L[OCK]=resource_name
Unless used with -EXACT
, specifies the leading prefix for an implicit wild card search of all locks that start with the resource_name
.
The resource_name
is enclosed in double quotation marks ("" ""). Because M resource names are formatted the same as global nodes with punctuation characters, in this context they are usually enclosed in sets of double quotation marks with string subscripts enclosed in sets of two double quotations.
When used with the CLEAR
command, the
LOCK
qualifier removes the locks that start with
resource_name
.
When used with the SHOW
command, the
LOCK
qualifier provides a precise way to examine the
specified lock.
-[NO]I[NTERACTIVE]
Interactively clears one LOCK at a time. LKE displays each
current LOCK with the PID
of the owner process and
prompts for verification that the LOCK should be cleared. LKE retains
the LOCK for any response other than
Y[ES]
.
By default, CLEAR
operates interactively
(-INTERACTIVE
).
To avoid holding a lock resource too long, LKE skips to the next matching LOCK if there is no operator response for several seconds.
-NOINTERACTIVE
forces the action to take place
without user confirmation of each change. Using
-NOINTERACTIVE
prevents the LKE operator from
controlling the LOCK subsystem for potentially long periods of
time when many locks are held. To do this, it limits the amount of
time it waits for each response.
-O[UTPUT]="file-name
"
Directs the reporting of all specified LOCKs to a file.
If you specify an existing file, LKE creates a new version and overwrites that file.
If file-name
has permission
issues, OUTPUT
reports the cause of the error.
The -OUTPUT
qualifier is compatible with all
other qualifiers.
By default, CLEAR
sends output messages to
stdout
.
-P[ID]=pid
Specifies the process identification number that holds a LOCK on a resource name.
LKE interprets pid
as a decimal
number.
PID clears LOCKs held by the process with the specified process identification number.
Provides a means for directing CLEAR
to LOCKs
held by a process that is behaving abnormally.
The -PID
qualifier is compatible with all other
qualifiers.
-R[EGION]=region-name
region-name
specifies the region that
holds the locked resource names.
REGION
clears LOCKs
mapped by the
current global directory to a region specified by the
region-name.
The -REGION
qualifier is compatible with all
other qualifiers.
By default, CLEAR -REGION=
operates
interactively (-INTERACTIVE
).