$RlcRec

From m204wiki
Revision as of 13:18, 20 April 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $RLCREC function returns the internal record number for which the last record locking conflict occurred. This function is most useful when used within an ON FIND CONFLICT or ON RECORD LOCKING CONFLICT unit.

At the beginning of a request, $RLCREC is set to -1. After a record locking conflict occurs, $RLCREC returns the internal record number of the record in conflict. The $RLCREC function takes no arguments.

Example

This request prints the internal record number of the record that invokes the ON RECORD LOCKING CONFLICT unit:

BEGIN ON RECORD LOCKING CONFLICT PRINT 'UNABLE TO COMPLETE' PRINT 'CONFLICTING WITH RECORD # ' WITH $RLCREC END ON GET.NAME: FOR EACH RECORD WHERE - (FULLNAME IS GREATER THAN COLLUM POLICY NO IS BETWEEN 100340 AND 100492) CHANGE STATE TO CALIFORNIA END FOR END