ADELIA |
VADELIA |
SADELIA |
WADELIA |
MADELIA |
(I/B) |
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(I) (C/S) |
Type
1 A
Use
This reserved word tests whether the file or data area records are locked.
The value of *LOCKED can be tested after conventional reading, in the case of file access or after certain SQL instructions (VADELIA and SADELIA programs).
Two values are possible:
1 |
if the record is locked, |
0 |
if the record is not locked. |
Modification by the programmer is not recommended.
Note: You can use the *LOCKED reserved word or the error sub-routines to detect locked records.
Example
CHAIN CUSTOMERS
IF CUSTOMERS EXISTS
IF *LOCKED ='1'
....
END
END
The *LOCKED reserved word can be updated by the following 4GL instructions:
-
- CHAIN
- MANAGE_SFL (initialization)
- READ_DTAARA
- READ_EQUAL
- READ_LAST
- READ_P_EQUAL
- READ_PREVIOUS
- READ
As well as for VADELIA and SADELIA programs:
-
- CREATE_SQL
- DELETE_SQL
- EXEC_SQL
- READ_NX_SQL_C (on update mode cursors)
- UPD_SQL