OpenTP1 Version 7 Programming Reference C Language
dc_tam_close - Close a TAM table
Format
ANSI C, C++
#include <dctam.h> int dc_tam_close (DCLONG tblid, DCLONG flags) |
K&R C
#include <dctam.h> int dc_tam_close (tblid, flags) DCLONG tblid; DCLONG flags; |
Description
The function dc_tam_close() closes a TAM table. After the function dc_tam_close() is called, the table descriptor specified for tblid cannot be used.
If the function dc_tam_close() returns with an error, all the resources acquired within this function are released, and the status before this function was called is regained.
If the function dc_tam_open() has been called outside the transaction, the function dc_tam_close() must also be called outside the transaction.
Similarly, if the function dc_tam_open() has been called inside the transaction, the function dc_tam_close() must also be called inside the transaction. If the function dc_tam_close() is not called before the transaction terminates, the TAM table is closed at the synchronization point.
If the function dc_tam_close() is called for the function dc_tam_open(), which was called outside the transaction, in the service function, terminate all the transactions in the same process which has accessed the TAM table to be closed. No error check is made on this termination. Operation is not ensured if the dc_tam_close() is called without the transactions terminated.
Arguments whose values are set in the UAP
tblid
Specify the table descriptor of the TAM table to be closed. This descriptor is the return value of the function dc_tam_open().
flags
Specify DCNOFLAGS.
Return values
Return value | Return value (numeric) | Explanation |
---|---|---|
DC_OK | 0 | The TAM table was closed normally. |
DCTAMER_PARAM_TID | -1700 | The table descriptor specified for tblid is invalid. |
DCTAMER_PARAM_FLG | -1708 | The value specified for flags is invalid. |
DCTAMER_TAMEND | -1720 | The TAM service is being terminated. |
DCTAMER_PROTO | -1721 | The sequence of accessing the TAM table is invalid. |
The resource manager registration of the object file for transaction control having a linkage with the UAP is invalid. Alternatively, there is no linkage between the object file for transaction control and the UAP. |
||
atomic_update=N (nontransaction attribute) is specified in the user service definition of the UAP which called the function. | ||
DCTAMER_TRNOPN | -1722 | The function dc_tam_open() was called outside the transaction. |
DCTAMER_NOOPEN | -1726 | The TAM table is not open. |
DCTAMER_MEMORY | -1769 | The memory became insufficient. |
DCTAMER_IO | -1770 | An input/output error occurred. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.