LOCK (Lock a Data Area)

The LOCK function allows you to back up a data area, specifically a compressed data area, while the MUF is running. By granting this request, DBUTLTY inhibits an update that moves data records until the UNLOCK function is issued. See UNLOCK (Unlock a Data Area) for information.
datacom150
The LOCK function allows you to back up a data area, specifically a compressed data area, while the MUF is running. By granting this request, DBUTLTY inhibits an update that moves data records until the UNLOCK function is issued. See UNLOCK (Unlock a Data Area) for information.
A lock, when granted, remains in effect until an unlock is done or the MUF is terminated. If you request a lock on an already locked area, your request waits until the first lock is released and then is granted, thereby locking the area again.
 Any Index Area and data area buffers with pending writes are written to DASD for the specified area when this function is executed.
The LOCK function communicates with one MUF. Be aware of the following:
  • Ensure that DBUTLTY is communicating with the desired MUF by executing DBUTLTY with the same System Identifier module (DBSIDPR) that is being used by the MUF, and
  • Ensure proper load library concatenation by keeping the System Identifier modules (DBSIDPR) in separate load libraries.
If the z/OS Cross-System Coupling Facility (XCF) is being used, ensure that the TOGROUP DBSIDPR parameter is correctly defined.
When to Use LOCK
When backing up or performing maintenance on a data area, use the LOCK function to prevent movement of records in compressed data areas.
Although this function is designed specifically for compressed data areas, you can use LOCK on any data area.
How to Use LOCK
The MUF must be active when you execute this command. Use the following command format to issue a LOCK function.
►►─ LOCK OPTION=MOVER,DBID=
n
,AREA=
a
──────────────────────────────────────────►◄
 
Command
 
  •  
    LOCK
    Invokes the function that inhibits an update until the UNLOCK function is issued.
 
Required Keywords
 
  •  
    OPTION=MOVER
    Requests the option that inhibits movement of data records due to an update of a compressed data area.
  •  
    ,DBID=
    Identifies the database you want to lock or protect during the backup.
    •  
      Valid Entries:
      DATACOM-ID of the database
    •  
      Default Value:
      (No default)
  •  
    ,AREA=
    Identifies the area you want to lock or protect during the backup.
    •  
      Valid Entries:
      DATACOM-NAME of the area in the database specified
    •  
      Default Value:
      (No default)
Example JCL (LOCK)
The following shows the command to lock a data area during a backup.
 Use the following as a guide to prepare your JCL. The JCL statements are for example only. Lowercase letters in a statement indicate a value you must supply. Code all statements to your site and installation standards.
//jobname See the previous note and
JCL Requirements
.
// EXEC PGM=DBUTLTY,REGION=2M //STEPLIB See the previous note and
JCL Requirements
.
//SYSIN DD * Command Input LOCK OPTION=MOVER,DBID=1,AREA=DEM /*
Sample Report
Following is a sample report page. For an example report header, see Sample Report Headers.
CONTROL CARD(S) .........1.........2.........3.........4.........5.........6.........7.........8 LOCK OPTION=MOVER,DBID=1,AREA=DEM FUNCTION=LOCK AREA=DEM DBID=1 OPTION=MOVER
This page of the report shows the following:
  • The command exactly as entered.
  • An analysis of keywords encountered and expected. Any errors found are flagged with a note in the left margin.
  • Any messages related to syntax processing.
* REQUEST COMPLETE
This page of the report shows a message indicating that the LOCK completed successfully.