Using KSAM/XL and KSAM 64 (32650-90886)

120 Chapter9
KSAM Intrinsics
FOPEN
FOPEN
Opens a file.
Syntax
I16 CA U16V U16V I16V CA
filenum
:=FOPEN(
formaldesig,foption,aoption,recsize,device,
CA I16V
formmsg,userlabels
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, following file naming conventions. The file
name must begin with a letter and contain alphanumeric characters,
slashes, or periods. Terminate the string by placing a delimiter in the
array element following the last valid character. The delimiter can be any
nonalphanumeric character except a slash (/), period (.), colon (:), or
exclamation point (!).
If the file name is the name of a user-defined file, it can begin with an
asterisk (*). If the file name is the name of a system-defined file, it can
begin with a dollar sign ($). The remote location of a device can be specified
as
filename:envid
. The file, lockword, group, and account names are
each limited to eight characters in length.
The formal file designator can contain command interpreter variables and
expressions that are evaluated before the formal file designator is parsed
and validated.
Default: A nameless file is assigned that can be read or written to, but not
saved. (The domain option of a nameless file must specify a new file unless
it is a device file.)
foption
16-bit unsigned integer by value (optional)
Specifies up to eight different file characteristics, as noted below, by setting
corresponding bit groupings: