dc_dam_iclose - Close a physical file

Format

ANSI C, C++

#include <dcdami.h>
int  dc_dam_iclose (int fno, DCLONG flags)

K&R C

#include <dcdami.h>
int  dc_dam_iclose (fno, flags)
int      fno;
DCLONG   flags;

Description

The function dc_dam_iclose() closes a physical file created in the OpenTP1 file system.

If a file is not filled with data, the remaining part up to the end of the file is padded with blocks of null characters only in the following cases:

When closing a physical file, specify the file descriptor which is the return value of the function dc_dam_create() or dc_dam_iopen().

Arguments whose values are set in the UAP

fno

Specify the file descriptor of the file to be closed.

flags

Specify DCNOFLAGS.

Return values

Return valueReturn value (numeric)Explanation
DC_OK0The physical file was closed normally.
DCDAMER_BADF-1603The file descriptor specified for fno is not the one which was acquired by opening the file normally.
The specified file is not open.
DCDAMER_PARAM_FLAGS-1611The value specified for flags is invalid.
DCDAMER_IOER-1620An output error occurred.