In general, a locator is valid for the duration of a transaction. Use the deallocate locator function to override the default scoping, and deallocate the locator within the transaction.
begin tran declare @v text_locator select @v = textcol from my_table where id=5 deallocate locator @v ... commit
deallocate locator removes the LOB value for @v from SAP ASE memory before the transaction commits, and marks the locator as invalid.