IFBOUT (HLI function)

From m204wiki
Revision as of 21:03, 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 IFBOUT call (BACK OUT) backs out an incomplete transaction on the thread or threads that are active for the transaction in which the thread participates.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
71

Syntax

IFBOUT(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 IFBOUT call to activate the Model 204 backout mechanism. The backout function is valid only for transaction backout (TBO) files.

You can issue the IFBOUT call on the following IFSTRT threads:

  • In IFAM2/IFAM4, a single cursor IFSTRT thread with update privileges or a multiple cursor IFSTRT thread.

    Note: You cannot issue IFBOUT on a single cursor IFSTRT thread with read-only privileges, that is, with a thread type indicator of 0.

  • In IFAM1, a single cursor or multiple cursor IFSTRT thread.

    Note: Only the thread, or threads, that participate in the current transaction are backed out. Any IFAM1 type IFSTRT thread involves a single-threaded transaction.

Single cursor IFSTRT threads that are started in a multithreaded IFAM2 or IFAM4 HLI job participate in a multithreaded transaction. See HLI: Transactions for more information about transaction processing in an HLI job.

IFBOUT is not valid on a read-only type thread, that is, any thread that is started by IFSTRT with an update indicator of 0 for an IFAM2 / IFAM4 connection.

Record locking behavior

IFBOUT 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 log 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.

To ensure that all of the records and resource locks are released after the IFBOUT call executes in a multithreaded transaction, issue IFCMMT on all of the other single cursor IFSTRT threads participating in the transaction.

Note: A completed transaction cannot be backed out.

For more information about transaction backout, see HLI: Transactions.

Completion return code (RETCODE)

If the IFBOUT call is unsuccessful, Model 204 returns the following error completion codes:

Code Error condition
4 IFBOUT called for a non-transaction backout (non-TBO) file or for a read-only thread.
40 IFBOUT call is encountered on a single cursor IFSTRT thread having read-only privileges.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. . . . PROCEDURE DIVISION. . . . CALL "IFBOUT" USING RETCODE.