IFCMMT (HLI function): Difference between revisions
(Created page with "==IFCMMT call -mc,sc== <dl> <dt>Description</dt> <dd>The IFCMMT call (COMMIT) commits and ends the current update unit for the active thread or threads. </dd> <dt>Thread type...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]]. | ||
==Summary== | |||
<dl> | <dl> | ||
Line 30: | Line 32: | ||
</table> | </table> | ||
==Usage notes== | |||
<p> | <p> | ||
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: </p> | 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: </p> | ||
Line 40: | Line 42: | ||
<p class="note"><b>Note:</b> If an IFCMMT call is encountered on a read-only single cursor IFSTRT thread, Model 204 returns an error completion code of 40. </p> | <p class="note"><b>Note:</b> If an IFCMMT call is encountered on a read-only single cursor IFSTRT thread, Model 204 returns an error completion code of 40. </p> | ||
===Record locking behavior=== | |||
<p> | <p> | ||
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. </p> | 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. </p> | ||
Line 48: | Line 50: | ||
For more information about transaction management, see [[HLI: Transactions]].</p> | For more information about transaction management, see [[HLI: Transactions]].</p> | ||
==Coding example (COBOL)== | |||
<p class="code">WORKING-STORAGE SECTION. | <p class="code">WORKING-STORAGE SECTION. | ||
01 ARGS-FOR-CALL. | 01 ARGS-FOR-CALL. |
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.