clbvdb, opbvdb, rdvdb, savvdb, wrvdb — Paged low-level input/output system
subroutine clbvdb(handle,0,0,0,status) integer*4 handle integer*4 status subroutine opbvdb(handle,fname,lbuf,dummy,lpage,iopen,status) integer*4 handle character*(*) fname integer*4 lbuf integer*4 lpage integer*4 iopen integer*4 status subroutine rdvdb(handle,ipos,buffer,size,status) integer*4 handle integer*4 ipos character*(*) buffer integer*4 size integer*4 status subroutine savvdb(handle,status) integer*4 handle integer*4 status subroutine wrvdb(handle,ipos,buffer,size,status) integer*4 handle integer*4 ipos character*(*) buffer integer*4 size integer*4 status
The MemCom paging system consists of a functions for emulating a paging mechanism by transferring data from the user space via a buffer to the database (and vice versa). Data transaction is completely transparent to the user.
If a file is opened in paged mode, i.e by calling
opbvdb
, the MemCom
system tables will be ignored. Any application which accesses
MemComs should therefore make use of the
wtwadb
and putwadb
or
rdwadb
and getwadb
DB
system calls. The following functions are available:
clbvdb
closes the paged input/output
file. The pages in the buffer are copied to their destination
pages on the database.
opbvdb
opens a paged input/output
file for access. The file handle, file name, buffer address,
buffer length and page length are specified.
rdvdb
reads raw data arrays from the
database and transfer them to the user space. Data are either
copied from the file to the buffer and to the user space (page
fault), or moved from the buffer to the user space (data already
in the page buffer).
savvdb
saves the content of the page
buffer.
wrvdb
writes raw data from the user
area to the paged input/output file. Data are moved to the
buffer and copied to the database if one or more page faults
become necessary.
Note
: These functions work with word
addresses (not byte addresses) and starting at word count 1. Thus,
they are compatible with MemCom 6.
Nevertheless they should not be use in new applications, since
addresses are now based on bytes, and the byte count starts at
address 0.
handle
Database handle (input). The file handle
handle
may not exceed the maximum number of
simultaneously open databases.
fname
File name (input).
lbuf
Paged input/output buffer size counted in integer*4 words (input).
dummy
Dummy variable for compatibility with version 6 (input).
lpage
Length of one page counted in integer*4 words (input).
iopen
File open code (input/output).
ipos
integer*4 word address on file of data to be transferred (input).
buffer
Buffer containing data to be transferred (void, i).
size
Number of integer*4 words to be read or written (input).
status
Status code returned (output). Upon successful completion of the operation, the status value 0 is returned. A negative value is returned, if an error has been detected. A positive value is returned, if a warning has been issued. See MemCom error codes.