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 valueReturn value (numeric)Explanation
0 or positive integerThe value 0 or a positive integer indicates a relative block number.
DCDAMER_BADF-1603The 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-1605The call sequence of functions which access the DAM file is invalid.
DCDAMER_BNOER-1606The relative block number is invalid.
DCDAMER_PARAM_FLAGS-1611The value specified for flags is invalid.
DCDAMER_IOER-1620An output error occurred.