Accessing Files Programmer's Guide (32650-90885)

Chapter 2 25
Creating A File
The HPFOPEN Intrinsic
0 Read access only, if the file's security provisions allow read
access. FWRITE, FUPDATE, and FWRITEDIR intrinsic calls
cannot reference this file. The end-of-file (EOF) is not
changed; the record pointer starts at zero. (Default)
1 Write access only, if the file's security provisions allow
write access. Any data written in the file prior to the
current HPFOPEN request is deleted. FREAD, FREADSEEK,
FUPDATE, and FREADDIR intrinsic calls cannot reference
this file. The EOF is set to zero; the record pointer starts
at zero. On magnetic tape an EOF is written to the tape
when the file is closed even if no data is written.
2 Write-Save access only, if the file's security provisions
allow write access. Previous data in the file is not deleted.
FREAD, FREADSEEK, FUPDATE, and FREADDIR intrinsic
calls cannot reference this file. The EOF is not changed;
the record pointer starts at zero. Therefore, data is
overwritten if FWRITE is called. The system changes this
value to append for message files.
3 Append access only, if the file's security provisions allow
either append or write access. FREAD, FREADDIR,
FREADSEEK, FUPDATE, FSPACE, FPOINT, and
FWRITEDIR intrinsic calls cannot reference this file. The
record pointer is set to EOF prior to each FWRITE. For disk
files, the EOF is updated after each FWRITE call.
Therefore, data cannot be overwritten.
4 Read/Write (I/O) access only, if the file's security
provisions allow both read and write access. If both read
and write access are not allowed, the access type is limited
to that specified in the security provisions (either read or
write). Any file intrinsic can be issued except FUPDATE for
this file. The EOF is not changed; the record pointer starts
at zero. This option is not valid for message files.
5 Update access only, if the file's security provisions allow
both read and write access. If both read and write access
are not allowed, the access type is limited to that specified
in the security provisions (either read or write). All file
intrinsics can be issued, including FUPDATE, for this file.
The EOF is not changed; the record pointer starts at zero.
This option is not valid for message files.
6 Execute access only, if the file's security provisions allow
execute access. This allows read/write access to any loaded
file. The program must be running in privileged mode to
specify execute access. This option is not valid for message
files.
7 Execute-Read access only, if the file's security provisions
allow execute access. This allows only read access to a