Set an EXCLUSIVE LOCK with JDBC
search cancel

Set an EXCLUSIVE LOCK with JDBC

book

Article ID: 117463

calendar_today

Updated On:

Products

IDMS

Issue/Introduction

This document provides an example of how to use a PROCEDURE to place an exclusive lock on a record occurrence.

There is no way to place the equivalent of an EXCLUSIVE LOCK on a record occurrence using SQL syntax. There is a FOR UPDATE clause but it is designed to impact the optimization of the query and doesn't place any additional locks.

Environment

Release: All supported releases.

Resolution

The attached .zip file contains sample source code for a procedure to place an EXCLUSIVE LOCK on a network-defined record.
The file contains the procedure definition, the source code of the implementing cobol program, and sample Java code to invoke it.

Additional Information

Attachments

kd117463.zip get_app