MPE/iX Intrinsics Reference Manual (32650-90875)

226 Chapter6
Command Definitions (FLUSHLOG-GETUSERMODE)
FOPEN
FOPEN
NM and CM callable.
Establishes access to a file and defines the physical characteristics of the file prior to
access.
Syntax
I16 CA U16V U16V I16V CA
filenum
:=FOPEN(
formaldesig,foption,aoption,recsize,device,
CA I16V I16V I16V
formmsg,userlabels,blockfactor,numbuffer
I32V I16V I16V I16V
filesize,numextent,initialloc,filecode
);
Functional Return
filenum
16-bit signed integer (assigned functional return)
Returns a unique file number identifying the opened file.
Parameters
formaldesig
character array (optional)
Passes a formal file designator interpreted according to MPE-escaped
semantics. The file name must be terminated by a nonalphanumeric
character other than a period (.), a slash (/), a hyphen (-), and an
underscore (_).
The file referred to by
formaldesig
can be either an MPE file (i.e., one
that uses MPE syntax) or it can follow HFS syntax. If
formaldesig
follows
MPE syntax, the file name can include password, group, and account
specifications. The file name can backreference a file equation and
optionally be preceded by an asterisk. If
formaldesig
follows HFS syntax,
the file name must start with either a dot (.) or a slash (/).
The file referred to by
formaldesig
may reside either in an MPE group or
in an HFS directory. For files located in HFS directories, traverse directory
entries (TD) access is required to all directories specified in
formaldesig
.
If there is no TD access, FOPEN fails and a call to FCHECK with
filenum
set
to 0 will return a system error code (398) in the
fserrorcode
parameter.
If
formaldesig
is an escaped pathname:
you cannot reference remote files
it cannot express a name equivalent to
filename
:
envid
you cannot use the
device
parameter (
device
=
node
#) to specify the
remote location of a device