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 valueReturn value (numeric)Explanation
DC_OK0The logical file was closed normally.
DCDAMER_PROTO-1600The 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-1603The 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-1611The value specified for flags is invalid.