$RlcUsr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<p>
<p>
The <var>$RlcUsr</var> function returns the user number of the user with which the request conflicted when the last record locking conflict occurred. This function is most useful when used within an ON FIND CONFLICT or ON RECORD LOCKING CONFLICT unit.   </p>
The <var>$RlcUsr</var> function returns the user number of the user with which the request conflicted when the last record locking conflict occurred. This function is most useful when used within an <var>ON FIND CONFLICT</var> or <var>ON RECORD LOCKING CONFLICT</var> unit. </p>
<p>
<p>
At the beginning of a request, <var>$RlcUsr</var> is set to null values. After a record locking conflict occurs, <var>$RlcUsr</var> returns the user number of the conflicting user as a five-digit <var>String</var> with leading zeros. The <var>$RlcUsr</var> function takes no arguments. </p>
At the beginning of a request, <var>$RlcUsr</var> is set to null values. After a record locking conflict occurs, <var>$RlcUsr</var> returns the user number of the conflicting user as a five-digit <var>String</var> with leading zeros. </p>
<p>
The <var>$RlcUsr</var> function takes no arguments. </p>


===Example===
===Example===
<p>
<p>
This request prints the user number of the user that invokes the ON RECORD LOCKING CONFLICT unit:</p>
This request prints the user number of the user that invokes the <var>ON RECORD LOCKING CONFLICT</var> unit:</p>
<p class="code">BEGIN
<p class="code">BEGIN
ON RECORD LOCKING CONFLICT
ON RECORD LOCKING CONFLICT

Revision as of 15:26, 18 August 2014

The $RlcUsr function returns the user number of the user with which the request conflicted when 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, $RlcUsr is set to null values. After a record locking conflict occurs, $RlcUsr returns the user number of the conflicting user as a five-digit String with leading zeros.

The $RlcUsr function takes no arguments.

Example

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

BEGIN ON RECORD LOCKING CONFLICT PRINT 'UNABLE TO COMPLETE' PRINT 'CONFLICTING WITH USER # ' WITH $RLCUSR END ON GET.NAME: FOR EACH RECORD WITH - FULLNAME LIKE 'BAKER*,DEROUCHE,TANGO*' CHANGE AGENT TO CASOLA END FOR END