UNLOCK

The UNLOCK utility removes the external lock on an area.
idmscu19
The UNLOCK utility removes the external lock on an area.
The following topics are discussed on this page:
2
2
Authorization
To
You Need This Privilege
On
Unlock an area
DBAWRITE
The area
Syntax
  ►►─── UNLOCK ─┬─ AREA segment-name.area-name ─┬─────────────────────────►◄               └──── SEGMENT segment-name ─────┘  
Parameters
  • area
    Directs the UNLOCK utility to remove the lock, if present, on the specified area.
  • segment-name
    Specifies the name of the segment associated with the area.
  • area-name
    Specifies the name of the area.
  • SEGMENT
    segment-name
    Specifies the name of the segment to be unlocked.
Usage
How to submit the UNLOCK statement
You submit the UNLOCK statement only through the batch command facility. When submitting UNLOCK statements, you must run the batch command facility in local mode.
JCL Considerations
When you submit an UNLOCK statement through the batch command facility, the JCL to execute the facility must include statements to define the file containing the first page of the area to be processed.
For more information about the generic JCL used to execute the batch command facility, see the section for your operating system in this section.
Examples
Unlock by area
The following example directs the UNLOCK utility to remove the external lock on the EMPDEMO.EMP-DEMO-REGION area.
unlock area empdemo.emp-demo-region;
Unlock by segment
The following example directs the UNLOCK utility to remove the external lock on the EMPDEMO.EMP-DEMO-REGION segment.
unlock segment empdemo;
Sample Output
Unlock by area
When UNLOCK processing is completed, the following listing is generated.
IDMSBCF                                              IDMS Batch Command Facility                            mm/dd/yy   PAGE 1    UNLOCK AREA EMPDEMO.EMP-DEMO-REGION;  Status = 1        Extended Reason Code = 2367     Messages follow:  DB002367 C1M353: Warning: area EMPDEMO.EMP-DEMO-REGION was not locked.  AutoCommit will COMMIT transaction  Command Facility ended with warnings
Unlock by segment
When UNLOCK processing is completed, the following listing is generated.
IDMSBCF  nn.n          CA IDMS Batch Command Facility     mm/dd/yy    PAGE    1   UNLOCK SEGMENT EMPDEMO;   Area EMPDEMO.EMP-DEMO-REGION     was not locked   Area EMPDEMO.INS-DEMO-REGION     was not locked   Area EMPDEMO.ORG-DEMO-REGION     was not locked Status = 0        SQLSTATE = 00000
For more information about area locks, see .