OpenTP1 Version 7 Programming Guide

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

4.6 Lock for resources

This section explains the method for allowing OpenTP1 UAPs to control locks of any user resources. To acquire a resource, it is necessary to call the function dc_lck_get() [CBLDCLCK('GET')] from the OpenTP1 UAP.

The facility for locking any resources is available only when the basic OpenTP1 facility is TP1/Server Base. It is unavailable with TP1/LiNK.

Locking of resources is used by processes which are being run as transactions. Since locks are specified for individual transactions, resources are correctly updated so that a particular UAP transaction process can exclusively update a resource at a given time.

For locking of DAM files, see 4.1 DAM file service (TP1/FS/Direct Access). For locking of TAM files, see 4.2 TAM file service (TP1/FS/Table Access).

Organization of this section
4.6.1 Resources which can be put under lock
4.6.2 Types of lock
4.6.3 Specifying the maximum lock wait time
4.6.4 Insufficient table pool for lock
4.6.5 Releasing a resource from lock
4.6.6 Lock migration
4.6.7 Lock test