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

TMF Programming Environment
HP NonStop TMF Application Programmer’s Guide522419-005
1-4
Committing a Transaction
Committing a Transaction
If a transaction completes successfully, the changes that it made to a protected
database are made permanent; this is referred to as “committing the transaction.”
You terminate a TMF transaction and commit the effects of that transaction by invoking
the ENDTRANSACTION procedure. The following table summarizes the statements
that you use to do so, in each of the supported programming languages:
Aborting a Transaction
After a TMF transaction has been initiated but before it is committed, any application
program module that is doing work on behalf of that transaction can terminate the
transaction; this is referred to as “aborting the transaction.
When a transaction is aborted, all of the changes that were made to the database on
behalf of the transaction are backed out.
You abort a transaction by invoking the ABORTTRANSACTION procedure. The
following table summarizes the statements that you use to do so, in each of the
supported programming languages:
Programming
Language Statement Used for Invoking the ENDTRANSACTION Procedure
C, C++ status = ENDTRANSACTION;
COBOL85 ENTER “ENDTRANSACTION” GIVING status
FORTRAN status = ENDTRANSACTION
NonStop SQL/MP COMMIT WORK
Pascal status:= ENDTRANSACTION
SCREEN COBOL END—TRANSACTION
TAL status:= ENDTRANSACTION;
Programming
Language
Statement Used for Invoking the ABORTTRANSACTION
Procedure
C, C++ status = ABORTTRANSACTION;
COBOL85 ENTER “ABORTTRANSACTION” GIVING status
FORTRAN status = ABORTTRANSACTION
NonStop SQL/MP ROLLBACK WORK
Pascal status:= ABORTTRANSACTION
SCREEN COBOL ABORT—TRANSACTION
TAL status:= ABORTTRANSACTION;