Opening files

This topic describes how to open I/O files. You can open files using the Standard C fopen() and freopen() library functions. Alternatively, if you want to use the C++ I/O stream classes, you can use the constructors for the ifstream, ofstream or fstream classes, or the open() member functions of the filebuf, ifstream, ofstream or fstream classes.

To open a file stream with a previously opened z/OS® UNIX file descriptor, use the fdopen() function.

To open files with UNIX file system low-level I/O, use the open() function. For more information about opening files in UNIX file system, see Performing z/OS UNIX file system I/O operations.