The release statement clears locks on items locked with a previous matreadu, readu, or readvu statement.
release {file.var,} {ID.exp}
file.var | Specifies the file containing the item to be unlocked. |
ID.exp | Specifies the item to be unlocked. |
Example 1
readu item from customer.file,item-ID then input name if name # ’’ then item<1>=name item<20>=date() write item on customer.file,item-ID end else release customer.file,item-ID end end
Example 2
begin work for i = 1 to 100 write i:space(100) on i next i for i = 1 to 100 if mod(i,2) = 0 then readu xx from i end else read xx from i end if xx # i:space(100) then msg= "2 - failed read ":i; goto fail next i for i = 1 to 100 step 3 release i next i crt "Now check the locks, then hit return to continue"; in i rollback work;* do a rollback instead
:list-locks (i Item Locks PIB# Lvl Hash Item-id Filename 1623204 (0018C4A4) 1 1 00000032 2 %1806329804.16720a 1623205 (0018C4A5) 1 1 00000033 3 %1806329804.16720a 1623207 (0018C4A7) 1 1 00000035 5 %1806329804.16720a 1623208 (0018C4A8) 1 1 00000036 6 %1806329804.16720a 1623210 (0018C4AA) 1 1 00000038 8 %1806329804.16720a 1623211 (0018C4AB) 1 1 00000039 9 %1806329804.16720a 1623212 (0018C4AC) 1 1 0000021B 11 %1806329804.16720a 1623213 (0018C4AD) 1 1 0000021C 12 %1806329804.16720a