OpenTP1 Version 7 Programming Reference C Language
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:
|
||
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. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.