basic.release Statement/BASIC Program

basic.release

Command basic.release Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description releases (clears) items locked with a previous "matreadu", "readu" or "readvu" statement.

If the "file.variable" and "id.expression" are both omitted, all items currently locked by the current process are unlocked.

If the "id.expression" is specified without the "file.variable", the default file.variable is used.
Syntax release {file.variable,} {id.expression}
Options
Example
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

In this example, an item is read from the "customer.file" and locked. 
If a new name is entered, the name attribute is changed, a date stamp is placed 
in attribute 20 and the item is written, automatically clearing the item lock. 
If no name is entered, no write occurs, requiring the item lock to be cleared 
with the "release" statement.
Purpose
Related basic.statements
basic.default.files
basic.file.variable
basic.writevu
basic.matwrite
tcl.unlock-item
tcl.unlock-group
basic.matread
basic.readv
basic.id.expression