Accessing Files Programmer's Guide (32650-90885)

20 Chapter2
Creating A File
The HPFOPEN Intrinsic
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, HPFOPEN fails and a value of -180 is returned in
the
status.info
parameter. If you are using HPFOPEN to create a file or
hierarchical directory and you lack of create directory entry (CD) access,
status
.
info
will return a value of -179.
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
If
formaldesig
is the name of a user-defined file, it can begin with an
asterisk (*). If
formaldesig
is the name of a system-defined file, it can
begin with a dollar sign ($). When creating a KSAM file,
formaldesig
must be a unique file name, that is, one not currently existing in the
permanent file directory.
The formal file designator can contain command interpreter variables and
expressions that are evaluated before
formaldesig
is parsed and
validated.
As the default, HPFOPEN creates a nameless file 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.)
The following are examples of valid formal file designators:
&file/lock.group.account:node.dest.level&
&filename&
&!myfile&
&!afile/![FINFO("!afile",33)]&
The following are examples of invalid formal file designators:
"filename.group (missing delimiter ("))
file.group" ( 'f' is used as delimiter, missing at end)
(ASC) It is recommended that this
itemnum
,
item
pair be used for
asynchronous devices.
When you use HPFOPEN to open a file, you may use either
itemnum
=2 or
itemnum
=51; you cannot use both.
3/I32 Domain:
Passes a value indicating which file domain the system searches to locate
the file. A nameless disk file must always be a new file.