IFCMMT (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:06, 12 July 2016

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

Summary

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.