OpenTP1 Version 7 Programming Reference C Language

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

dc_dam_bseek - Seek a physical file block

Format

ANSI C, C++

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

K&R C

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

Description

The function dc_dam_bseek() specifies the relative block number of a physical file to position the file at the corresponding block. Call this function after the function dc_dam_iopen() that requests re-creation output.

When the corresponding relative block number is in the file, the relative block number is returned without modification.

When seeking a physical file block, specify the file descriptor which is the return value of the function dc_dam_iopen().

Arguments whose values are set in the UAP

fno

Specify the file descriptor of the file containing a block to be located.

blkno

Specify the relative block number to be located.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
0 or positive integer The value 0 or a positive integer indicates a relative block number.
DCDAMER_BADF -1603 The file descriptor specified for fno is not the one which was acquired by opening the file normally.
The DAM file is not open.
DCDAMER_SEQER -1605 The call sequence of functions which access the DAM file is invalid.
DCDAMER_BNOER -1606 The relative block number is invalid.
DCDAMER_PARAM_FLAGS -1611 The value specified for flags is invalid.
DCDAMER_IOER -1620 An output error occurred.