IFERLC (HLI function)

From m204wiki
Revision as of 22:02, 11 July 2016 by ELowell (talk | contribs)
Jump to navigation Jump to search

The conventions used on this page are described in Function call notation conventions.

Summary

Description
The IFERLC call (EXAMINE RECORD LOCKING CONFLICT) returns a file name, record number, and user name after a record locking conflict occurs in an HLI program that issued IFFIND, IFUPDT, or any other call that requires locking a record.

For information about which calls lock records and record sets, see HLI: Locking behavior of HLI calls.

IFERLC is similar to the ON RLC statement in SOUL.

Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
138

Syntax

IFERLC(RETCODE,RECNUM,USERNUM,FILENAME)

Compile-only form
Not available
Execute-only form
Not available

Specify the parameters in the syntax order shown above.

Parameter Description
RETCODE [O,i,r] The Model 204 return code is the required output parameter. The code is a binary integer value.
RECNUM [O,c,o] The record number is an optional output parameter that returns the internal record number for which the record locking conflict occurred. This parameter is a character string.
USERNUM [O,c,o] The user number is an optional output parameter that returns the user number of the user with which the IFAM program conflicted. The parameter is a character string.
FILENAME [O,c,o] The file name is an optional output parameter that returns the name of the file in which the record locking conflict occurred. The name is a character string.

Usage notes

Use the IFERLC call after a record locking conflict (return code 3) is returned by Model 204 to an HLI program that issued a call that locks a record (such as IFFIND, IFSTOR or IFUPDT). For more information about record locking conflicts, see Record level locking and concurrency control.

Completion return code (RETCODE)

If no record locking conflict is found, IFERLC returns an error code of 15.

For more information, see:
$RlcFile function
$RlcRec function
$RlcUsr function

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 RECNUM PIC X(11). 05 USERNUM PIC X(5). 05 FILENAME PIC X(8) VALUE "FN1;". . . . PROCEDURE DIVISION. . . . CALL "IFERLC" USING RETCODE, RECNUM, USERNUM, FILENAME.