Terminal files

When you are running with the runtime option POSIX(OFF) under interactive TSO, z/OS® XL C/C++ associates streams to the terminal. You can also call fopen() to open the terminal directly if you are running under TSO (interactive or batch), and either the file name you specify begins with an asterisk (*), or the ddname has been allocated with a DSN of *.

When running with POSIX(ON), z/OS XL C/C++ associates streams to the terminal under TSO and a shell if the file name you have specified fits one of the following criteria:

Interactive IMS™ and CICS behave differently from what is described here. For more information about terminal files with interactive IMS and CICS see Using C and C++ standard streams and redirection.

If you are running with POSIX(ON) outside a shell, you must use the regular z/OS XL C/C++ I/O functions for terminal I/O. If you are running with POSIX(ON) from a shell, you can use the regular z/OS XL C/C++ I/O functions or the POSIX low-level functions (such as read()) for terminal I/O.