z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Opening a stream implicitly

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

File streams can be opened implicitly or explicitly. You open a stream implicitly by using a path name as the stream name for one of the six input or output functions. If the function is charout() or lineout(), the file is opened for output. If the file does not exist, it is created. For newly created files, the permission bits 0666 are applied to your process umask. The position for the first write is set to the end of file, unless the function call explicitly specifies a write location. If one of the four input functions is used, the file is opened for input.

When it is opened implicitly, a stream can be opened for both input and output. The input and output locations are independent of each other. If the stream is opened for both input and output, two file descriptors are used. The stream close command closes the stream and both file descriptors.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014