Implicit locking for files, Nonrecoverable files – IBM SC34-7012-01 User Manual

Page 166

Advertising
background image

For details of PL/I coding restrictions in a CICS environment, see the appropriate
PL/I programmer’s guide for your compiler.

Locking (enqueuing on) resources in application programs

This topic describes locking (enqueuing) functions provided by CICS (and access
methods) to protect data integrity.

About this task

There are two forms of locking:
1.

The implicit locking functions performed by CICS (or the access method)
whenever your transactions issue a request to change data. These are described
under:

v

“Implicit locking for files”

v

“Implicit enqueuing on logically recoverable TD destinations” on page 157

v

“Implicit enqueuing on recoverable temporary storage queues” on page 157

v

“Implicit enqueuing on DL/I databases with DBCTL” on page 158.

2.

The explicit enqueuing function that you request by means of an EXEC CICS
command. This is described under “Explicit enqueuing (by the application
programmer)” on page 158.

Note:

Locking (implicit or explicit) data resources protects data integrity in the

event of a failure, but can affect performance if several tasks attempt to operate on
the same data resource at the same time. The effect of locking on performance,
however, is minimized by implementing applications with short units of work, as
discussed under “Dividing transactions into units of work” on page 143.

Implicit locking for files

This section first describes the implicit locking provided while nonrecoverable files
are being updated. It then describes the extended locking actions when recoverable
files are being updated.

Nonrecoverable files

For BDAM files that are nonrecoverable (that is, LOG=NO is specified in the FCT
entry), CICS does not lock records that are being updated.

By default, you get BDAM exclusive control, which operates on a physical block, is
system wide, but lasts only until the update is complete. If a transaction reads a
record for update under BDAM exclusive control, and the transaction subsequently
decides not to change the data, it must release the BDAM exclusive control. To do
this, issue an EXEC CICS UNLOCK command, which causes CICS to issue a
RELEX macro.

If you don’t want BDAM exclusive control, specify SERVREQ=NOEXCTL on the
file entry in the FCT.

For nonrecoverable VSAM files accessed in non-RLS mode, VSAM exclusive
control locks the control interval during an update. For nonrecoverable VSAM files
accessed in RLS mode, SMSVSAM locks the record during the update.

Figure 13 on page 155 illustrates the extent of locking for nonrecoverable files.

154

CICS TS for z/OS 4.1: Recovery and Restart Guide

Advertising