OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_tam_read_cancel - Cancel the input of a TAM table record

Format

ANSI C, C++

#include <dctam.h>
int  dc_tam_read_cancel (DCLONG tblid, struct DC_TAMKEY
                         *keyadr, int keyno, DCLONG flags)

K&R C

#include <dctam.h>
int dc_tam_read_cancel (tblid, keyadr, keyno, flags)
DCLONG           tblid;
struct DC_TAMKEY *keyadr;
int              keyno;
DCLONG           flags;

Description

The function dc_tam_read_cancel() cancels the input for reference or update processing with lock specified in the function dc_tam_read(), and resets lock in records.

For an updated or added record, the input for reference processing with lock specified cannot be canceled. For a record updated by the function dc_tam_rewrite(), the input for update processing cannot also be canceled.

If the input for update processing is canceled for updated/added records or for the records of a TAM table open under lock in tables, lock is not reset.

After the function dc_tam_read_cancel() cancels input, other transactions are not allowed to add/delete a record to/from the input TAM table until the transaction terminates.

If the function dc_tam_read_cancel() returns with an error, all the resources acquired within this function are released, and the status before this function was called is regained. When a request is made to access multiple specified records, even if one of the records causes an error, processing is stopped and an error is returned.

Arguments whose values are set in the UAP

tblid

Specify the table descriptor of the TAM table whose record input is to be canceled. The table descriptor is the value returned with the function dc_tam_open().

keyadr

Specify the address of the structure having the address of the key value of the record whose input is to be canceled. The structure format is as follows:

struct DC_TAMKEY {
                  char *keyname;
                 };

keyno

Specify the number of request records (number of structures specified for keyadr).

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 Search for the TAM table record was canceled, and lock in records was reset normally.
DCTAMER_PARAM_TID -1700 The table descriptor specified for tblid is invalid.
DCTAMER_PARAM_KEY -1702 The key value specified for keyadr is invalid.
DCTAMER_PARAM_KNO -1703 The value specified for keyno is invalid.
DCTAMER_PARAM_FLG -1708 The value specified for flags is invalid.
DCTAMER_NOTTAM -1709 The table specified for tblid is not a TAM table.
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_RMTBL -1723 The TAM table was deleted.
DCTAMER_NOLOAD -1724 The TAM table was not loaded.
DCTAMER_NOOPEN -1726 The TAM table is not open.
DCTAMER_LOGHLD -1727 The TAM table is in logical shutdown state.
DCTAMER_OBSHLD -1728 The TAM table is in shutdown state due to an error.
DCTAMER_NOREC -1731 The specified record does not exist.
DCTAMER_SEQENCE -1732 The function dc_tam_read() was not called.
DCTAMER_EXWRITE -1733 The table identifier specified for tblid indicates the record updated or added by the function dc_tam_write().
DCTAMER_EXREWRT -1734 The table descriptor specified for tblid was updated by the function dc_tam_rewrite().
DCTAMER_TBLVR -1760 The version of the TAM library linked to the UAP does not allow the UAP to operate with the current TAM table.
DCTAMER_FLSVR -1761 The version of the TAM library linked to the UAP does not allow the UAP to operate with the current OpenTP1 file service.
DCTAMER_TRNNUM -1765 The number of transactions exceeds the maximum number of transactions which can be managed by the TAM service.
DCTAMER_OPENNUM -1766 The number of open character special files exceeds the specified limit.
DCTAMER_ACCESSS -1767 The access permission for special files has not been granted.
DCTAMER_ACCESSF -1768 The access permission for TAM table files has not been granted.
DCTAMER_MEMORY -1769 The memory became insufficient.
DCTAMER_IO -1770 An input/output error occurred.
DCTAMER_TMERR -1771 A transaction service error occurred.