HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4- 4
A nonzero value represents the file error code returned
by the file subsystem of the MPE XL operating system.
The error number can be translated to an MPE XL file
system error message by looking up the table of file
system error codes in the
MPE XL Intrinsics Reference
Manual
under the FCHECK intrinsic.
ioaccess
If a file is opened by a program, the
ioaccess
specification determines how the program can access the
file. The value of
ioaccess
is one of the following
keywords:
READ The program can read from the file, but
cannot write to it.
WRITE The program can write to the file, but
cannot read from it.
APPEND The program can perform sequential
writes to the file starting after the
last record. It cannot read from the
file or perform direct writes to the
file.
READWRITE The program can read from and write to
the file. This is the default I/O
access if the RESTRICT option is not
specified.
useraccess
If a file is open to one program,
useraccess
determines
how other programs can access the file. It also
determines whether the program that opened the file can
open it again without closing it first. The value of
useraccess
is one of the following keywords:
EXCLUSIVE Other programs cannot access the file.
The program that opened it must close
it before opening it again. The
sequence:
ASSIGN
fname
TO
#fnum1
,RESTRICT=READ,
EXCLUSIVE
ASSIGN
fname
TO
#fnum2
is illegal. The sequence must be:
ASSIGN
fname
TO
#fnum1
,RESTRICT=READ,
EXCLUSIVE
ASSIGN * TO
fnum1
ASSIGN
fname
TO
#fnum2
SINGLEUSER Other programs cannot write to the
file, but the program that opened it
can open it again without closing it
first. The sequence:
ASSIGN
fname
TO
#fnum1
,RESTRICT=READ,
SINGLEUSER
ASSIGN
fname
TO
#fnum2
is legal; it opens the file
fname
twice
in the same program, at the same time.
SINGLEUSER is the default if this
parameter is not specified.
You must have LOCK capabilities at both
the account and group level in order to
open the file multiple times. If you
do not have those capabilities, then
the default access is EXCLUSIVE.
SHARED Other programs can access the file.