OpenTP1 Version 7 Programming Reference C Language

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

dc_dam_close - Close a logical file

Format

ANSI C, C++

#include <dcdam.h>
int dc_dam_close (int damfd, DCLONG flags)

K&R C

#include <dcdam.h>
int dc_dam_close (damfd, flags)
int      damfd;
DCLONG   flags;

Description

The function dc_dam_close() closes logical files.

When closing a logical file, specify the file descriptor which is the return value of the function dc_dam_open().

Arguments whose values are set in the UAP

damfd

Specify the file descriptor of the file to be closed.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 The logical file was closed normally.
DCDAMER_PROTO -1600 The function dc_rpc_open() is not called.
A DAM file opened outside the transaction is closed within the transaction. (This value is returned only when a recoverable DAM file is accessed.)
N is specified for atomic_update in the user service definition. (This value is returned only when a recoverable DAM file is accessed.)
The function dc_dam_start() is not called. (This value is returned only when an unrecoverable DAM file is accessed.)
The UAP is incorrectly linked as follows:
  • The library (-1tdam) to be used for access to a TAM file using a DAM service function is linked incorrectly.
  • The definition of the resource manager for transaction control object files is incorrect.
DCDAMER_BADF -1603 The file descriptor specified for damfd is not the one which was acquired by opening the file normally, or the file of the file descriptor is not open.
DCDAMER_PARAM_FLAGS -1611 The value specified for flags is invalid.