OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

CBLDCLCK('RELNAME ') - Release resource from lock specified by name

Format

PROCEDURE DIVISION specification

CALL  'CBLDCLCK'  USING  unique-name-1  unique-name-2

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A    PIC X(8) VALUE 'RELNAME '.
    02  data-name-B    PIC X(5).
    02  FILLER        PIC X(3).
    02  data-name-Z    PIC S9(9) COMP VALUE ZERO.
01  unique-name-2.
    02  data-name-C    PIC X(16).
    02  data-name-D    PIC X(7) VALUE 'MIGRATE'.
    02  FILLER        PIC X(1).

Description

CBLDCLCK('RELNAME ') specifies the name of a resource for which CBLDCLCK('GET ') specified lock, and releases the resource from the lock. Use this program when releasing the resource from lock before the synchronization point is acquired.

When the global transaction with lock specified terminates, the OpenTP1 lock service automatically releases the resource from lock. In this case, there is no need to specify release from lock in the UAP.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'RELNAME[Figure]' for the request code indicating release from lock by specifying the resource name.

data-name-Z

Specify 0.

data-name-C

Specify the name of the resource to be released from lock. The resource name must be the same name as when lock was specified for the resource.

data-name-D

Specify VALUE 'MIGRATE'.

Data area to which a value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 Normal termination
00401 The value specified for the data-name is invalid.
This error also occurs if the request code (data-name-A) is invalid.
00456 The resource that corresponds to the resource name specified for release from lock does not exist.
00455 CBLDCLCK('RELNAME ') was called from a UAP which was not operating as a transaction.
00457 The OpenTP1 library version does not match the lock service version.