Re: OSOPEN vs OPENSEQ on UniData -
09-15-2005
, 02:29 AM
I trust that the UniBasic Commands Ref manual is wrong when it gives
the following example:
OSBREAD TEST FROM 'RFILE' AT 0 LENGTH 10000
in that it also states:
Note: Before you use OSBREAD, you must open the file by using the
OSOPEN or OPENSEQ command.
so that, logically, if we're required to open a 'file' to a
file.variable then we would also be required to use the file.variable.
Also - OPENSEQ has a LOCKED clause. OSOPEN doesn't. What happens if two
or more processes OSBWRITE blocks of data to the same OS file (like
UniData record) at the same time? Is that what the ON ERROR clause is
for?
Also - the manual says that WRITESEQ doesn't actually write data to
disk, that it writes to a buffer, and that we should use WRITESEQF if
we want to force the update to disk. I can therefore understand that
CLOSESEQ must flush the buffer to disk too. Does
OSOPEN/OSBWRITE/OSCLOSE function similarly? Shouldn't there also be a
OSBWRITEF in that case?
Mike.
PS. I miss D3 and JS's excellent documentation ;P |