The record's scope, is the block in which the record was first referenced in a procedure or in a calling procedure.
COMPILE with the LISTING option can be used to determine a record's scope.
Any reference to a record, before the first block in the program, scopes that record to the procedure block. The procedure block does not end until program ends. Therefore, record locks being held until the end of the record scope are held for the duration of the program, even if the record is explicitly released with the RELEASE statement. |