TMF Application Programmer's Guide (G06.26+)

File System Procedures
HP NonStop TMF Application Programmer’s Guide522419-005
4-6
BEGINTRANSACTION
BEGINTRANSACTION
This procedure initiates a new transaction. When you call this procedure, TMF creates
a unique transaction identifier that distinguishes the new transaction from all other
active transactions. The new transaction identifier becomes the current transaction of
the calling process.
The form of the transaction identifier is as follows:
While the BEGINTRANSACTION procedure creates the transaction identifier, it does
not return it during the course of the procedure. GETTRANSID returns the transaction
identifer of the calling process’ current transaction. For more information, see the
description of the GETTRANSID procedure later in this section.
The value returned to the trans-begin-tag variable can be passed to the
RESUMETRANSACTION procedure to restore to currency a transaction that was
previously initiated by the calling process (or its backup).
Syntax for C Programmers
Syntax for TAL Programmers
Transaction ID Description
transid[0].<0:7> contains 1 plus the Expand system number of the system in which
BEGINTRANSACTION was called (this field contains 0 if the originating
system is not part of a network). The system number identifies the home
node of the transaction.
transid[0].<8:15> contains the number of the processor in which the transaction
originated.
transid[1:2] contains a double-word sequence number to make the transaction
identifier unique.
transid[3] always contains 0.
#include <cextdecs(BEGINTRANSACTION)>
short BEGINTRANSACTION ([ long _near *
trans-begin-tag ]);
status := BEGINTRANSACTION ( [
trans-begin-tag ] ); !o