You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

9.221 UNLOCK_OBJECT

Releases the lock on the specified User Object

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Object Type.

1

20



2

A

Opt

Object Identifier 1.

ALL = All Identifiers

1

10



3

A

Opt

Object Identifier 2.

ALL = All Identifiers

1

10



4

A

Opt

Object Identifier 3.

ALL = All Identifiers

1

10



5

A

Opt

Object Identifier 4.

ALL = All Identifiers

1

10



6

A

Opt

Locking Level

ANY = Any (Default)
FUNC = Function
JOB= Job
PERM = Permanent

3

4



Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = Object was successfully unlocked.

ER = Object could not be unlocked

2

2



There are some rules concerning the ability and access to locked User Objects. These rules are determined by the Locking Level used to lock the User Object, and are as follows:-

  • When a User Object is locked with a 'FUNC' Locking Level it may only be unlocked by the same function and job that the lock was allocated in. If the 'ALL' literal is used for an Object Identifier and multiple User Object locks are found, then only locks allocated in the current function and job are unlocked.

  • When a User Object is locked with a 'JOB' Locking Level it may only be unlocked by the same job that the lock was allocated in. If the 'ALL' literal is used for an Object Identifier and multiple User Object locks are found, then only those allocated in the current job are unlocked.

  • A User Object locked with a Locking Level of 'PERM' may be unlocked by any job or function.

  • User Object locks are also automatically unlocked as determined by the Locking Level specified on the LOCK_OBJECT.

  • A Locking Level of 'FUNC' indicates that the lock will be automatically removed at the end of the function that created it.

  • A Locking Level of 'JOB' indicates that the lock will be automatically removed when you exit LANSA.

  • A Locking Level of 'PERM' indicates that the User Object lock exists until removed with UNLOCK_OBJECT.


Note: Because some User Object locks are automatically removed, you may not need to use the UNLOCK_OBJECT Built-In Function. By locking the User Object with the appropriate Locking Level you can allow the locks to be automatically released at the end of the function/LANSA.

For further information and examples concerning User Objects and their locking refer to the Built-In Function 9.130 LOCK_OBJECT.

  • No labels