IFENQL (HLI function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
The conventions used on this page are described in [[HLI: Function call list#Function call notation conventions|Function call notation conventions]].
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]].


==Summary==
==Summary==

Latest revision as of 22:49, 12 July 2016

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

Summary

Description
The IFENQL call (ENQUEUE LIST) enqueues that set of records on the specified list.
Thread type
single cursor IFSTRT thread
IFCALL function number
40

Syntax

IFENQL(RETCODE,LIST_NAME,ACTION,TIME)

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 first parameter. The code is a binary integer value.
LIST_NAME [I,c,r] The list name is a required input parameter that specifies the name of a list. Specify the list as a character string.
ACTION [I,i,r] The action is a required input parameter that specifies whether to enqueue on the set of records in share or exclusive mode. Specify one of the following integer values:

1 = Enqueues in share mode

2 = Enqueues in exclusive mode

TIME [I,i,r] The time is a required input parameter. Specify an integer value that is the number of times to retry; the wait time is in three-second periods.

Usage notes

On a single cursor IFSTRT thread, a subsequent call to IFPROL places the current record on the list and enqueues on the record itself with the status specified for the list. On a single cursor IFSTRT thread, a subsequent call to IFRRFL removes the record from the list and dequeues it.

On a single cursor IFSTRT thread, a call to IFLIST following a call to IFENQL dequeues the set of records currently on the list, clears the list, and places the current set on it with no enqueuing.

Note: Calls to IFLIST, IFPROL, and IFRRFL do not perform any enqueuing operations if IFENQL has not first been executed.

If a call to IFENQL results in an enqueuing conflict, Model 204 waits at most three seconds and then tries again, for as many times as specified in the time parameter (the wait time is in three-second periods). After trying unsuccessfully for the number of times indicated in the time parameter, Model 204 returns a completion code of 3 to the HLI program.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 LISTNAME PIC X(9) VALUE "CARSLIST;". 05 ACTION PIC 9(5) COMP SYNC VALUE 1. 05 TIME PIC 9(5) COMP SYNC VALUE 5. . . . PROCEDURE DIVISION. . . . CALL "IFENQL" USING RETCODE, LISTNAME, ACTION, TIME.