Performing z/OS UNIX file system I/O operations

You can create the following file types in the z/OS® UNIX file system:
  • Regular
  • Link
  • Directory
  • Character special
  • FIFO

The Single UNIX Specification defines another type of file called STREAMS. Even though the system interfaces are provided, it is impossible to have a valid STREAMS file descriptor. These interfaces will always return a return code of -1 with errno set to indicate an error such as, EBADF, EINVAL, or ENOTTY.

z/OS UNIX file system streams follow the binary model, regardless of whether they are opened for text, binary, or record I/O. You can simulate record I/O by using new-line characters as record boundaries.

For information on the z/OS UNIX file system and access to files within it from other than the C or C++ language, see z/OS UNIX System Services User's Guide. For an introduction to and description of the behavior of a POSIX-defined file system, see Zlotnick, Fred, The POSIX.1 Standard: A Programmer's Guide,,Redwood City, CA: The Benjamin/Cummings Publishing Company, Inc., 1991.

This topic describes C I/O stream functions as they can be used within C++ programs. If you want to use the C++ I/O stream classes instead, see Using the Standard C++ Library I/O Stream Classes. For more detailed information, see Standard C++ Library Reference. For information about using wide-character I/O with z/OS XL C/C++, see z/OS XL C Support for the double-byte character set.