Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Database Access : Fetching records : ROWID and RECID data types : Returning record ROWID values
 
Returning record ROWID values
ABL provides a function named after the ROWID data type to return ROWID values. Given a buffer name, the ROWID function returns the ROWID of the current record in the buffer. This example fetches the first Customer record, and if it has a balance, refetches it to lock it for update:
DEFINE VARIABLE custrid AS ROWID NO-UNDO.

FIND FIRST Customer NO-LOCK.
custrid = ROWID(Customer).

IF balance > 0 THEN DO:
  FIND Customer WHERE ROWID(Customer) = custrid EXCLUSIVE-LOCK.
  UPDATE Customer.
END.