MPE/iX Intrinsics Reference Manual (32650-90875)

246 Chapter6
Command Definitions (FLUSHLOG-GETUSERMODE)
FOPEN
Operation Notes
A file can be referenced by its formal file designator. When executed, a unique file number
is returned to the process. This file number can be used, rather than the formal file
designator, in other calls to this file.
NOTE
If a file is opened with read access only (bits 12:4 = 0000) a subsequent call to
FOPEN to write and set eof to 0 (bits 12:4 = 0001) succeeds but only after the
system changes the call to write but not set eof to 0 (bits 12:4 =0010). This
protects the reader, who opened the file first, from having the eof set to 0.
Condition Codes
CCE (2) Request granted. The file is open.
CCG (0) Not returned.
CCL (1) Request denied. For example, another process already has exclusive or
semi-exclusive access for this file, the privilege level of this file is not user
(3), or an initial allocation of disk space cannot be made due to lack of disk
space. If the file is not opened successfully, the file number value returned
by FOPEN is 0. Call the FCHECK intrinsic for more details.
Related Information
Intrinsics HPFOPEN
Manuals Accessing Files Programmer's Guide, Using KSAM XL, and KSAM/3000
Reference Manual
numextent 47, numextent
initialloc 36, initial allocation
filecode 37, filecode
Table 6-1. FOPEN/HPFOPEN Parameter Equivalents
FOPEN Parameter HPFOPEN Itemnum,Item