Use this record-level keyword to specify that the i5/OS™ operating system is to unlock the keyboard immediately after issuing an input operation to the record format you are defining.
Without the UNLOCK keyword, the i5/OS operating system leaves the keyboard locked after reading the data on the display. The workstation user cannot key data into input-capable fields while the data that has just been read is being processed.
UNLOCK[(*ERASE) | (*MDTOFF)] | [(*ERASE *MDTOFF)] | [(*MDTOFF *ERASE)]
The parameter values *ERASE and *MDTOFF are optional. If you do not specify any parameter value, *ERASE is the default.
When your program sends an input operation, the following sequence of operations typically occurs:
The keyboard remains unlocked, input-capable fields on the display are erased, and their MDTs remain on following the input operation.
The keyboard remains unlocked, input-capable fields on the display are not erased, and their MDTs are set off following the input operation.
The keyboard remains unlocked, input-capable fields on the display with their MDTs set on are erased, and their MDTs are set off following the input operation.
The GETRETAIN keyword is ignored and an error message results at file creation time if the GETRETAIN keyword is specified with UNLOCK(any parameter).
Option indicators are not valid for this keyword.
The following example shows how to specify the UNLOCK keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 UNLOCK(*ERASE) 00020A FLD1 4 B 2 2 00030A FLD2 4 B 3 2 A 00040A R RECORD2 UNLOCK(*MDTOFF) 00050A FLD21 4 B 4 2 00060A FLD22 4 B 5 2 A 00070A R RECORD3 UNLOCK(*ERASE *MDTOFF) 00080A FLD31 4 B 6 2 00090A FLD32 4 B 7 2 A