number. For example, the following open system call (called from a C-language program) opens a file named DATA.DAT for reading and writing, and returns the value of an HP-UX file descriptor:

#include /* definition of O_RDWR contained here */

fildes = open("DATA.DAT", O_RDWR)

Obtaining an HP-UX file descriptor

The Fortran intrinsic FNUMreturns the HP-UX file descriptor for a given logical unit. See the program in “File handling” (page 120) for an example of how to call the FNUMintrinsic. For information about FNUM, see the HP Fortran Programmer's Reference.

Using HP-UX file I/O 109