IFCMMT (HLI function)
IFCMMT call -mc,sc
- Description
- The IFCMMT call (COMMIT) commits and ends the current update unit for the active thread or threads.
- Thread type
- multiple cursor IFSTRT, single cursor IFSTRT
- IFCALL function number
- 72
Syntax
IFCMMT(RETCODE)
- Compile-only form
- Not available
- Execute-only form
- Not available
Parameter | Description |
---|---|
RETCODE | [O,i,r] The Model 204 return code is the required output parameter. The code is a binary integer value. |
Usage notes
Use the IFCMMT call to end an update unit. IFCMMT applies to the active threads in a host language job. You can issue the IFCMMT call on the following types of threads:
- Single cursor IFSTRT update thread (thread type is 1)
- Multiple cursor IFSTRT thread
Note: If an IFCMMT call is encountered on a read-only single cursor IFSTRT thread, Model 204 returns an error completion code of 40.
Record locking behavior
IFCMMT releases the lock pending updates (LPU) exclusive lock on updated records and the single record enqueue (SRE) on the current record (if one exists) that were obtained by this thread. The transaction is ended for all participating threads and the backout and constraints logs are freed.
Found sets are not released and the current record does not change. In a multithreaded transaction the LPU and SRE locks obtained by other threads are still held. Also, you must issue IFCMMT on all of the single cursor IFSTRT threads participating in a multi-transaction if you issue the call on any one of the threads.
For more information about transaction management, see HLI: Transactions.
Coding example (COBOL)
WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. . . . PROCEDURE DIVISION. . . . CALL "IFCMMT" USING RETCODE.