randbwr() Random Block Write
#include <dos.h>
int randbwr(fcbptr,reccnt);
struct fcb *fcbptr; Pointer to structure
int reccnt; Number of records to be written
randbwr() uses DOS system call 0x28 to write 'reccnt' number of
records using the open FCB pointed to by 'fcbptr'. The records are
written into memory at the current disk transfer address. They are
written from the disk record indicated in the 'random record' field
of the FCB. If 'reccnt' is 0, the file is truncated to the value in
the 'random record' field. The 'random record' field will be advanced
by the number of records actually written and thus gives the total
number of records read.
Returns: The following values are returned, based on the result of
randbwr():
0 All records are written
1 End-of-file is reached and the last record
written is complete.
2 Writing records would have wrapped around
address 0xFFFF (as many records as possible
are written).
3 End-of-file is reached with the last record
incomplete.
randbwr() returns 1 if no records are written because
there is not enough disk space.
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster