$RlcRec: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (Mlarocca moved page $RLCREC to $RlcRec: Lower case change)
 
(No difference)

Latest revision as of 14:24, 29 July 2014

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