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


opendir

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

Read syntax diagramSkip visual syntax diagram
>>-opendir--pathname-------------------------------------------><

Function

opendir invokes the opendir callable service to open a directory stream so that it can be read by rddir. The file descriptor is returned in RETVAL.

Parameters

pathname
A pathname for the directory.

Usage notes

  1. You can use opendir and closedir together with the rddir syscall command, but not with the readdir command. The rddir command reads a directory in the readdir callable service format. Alternatively, you can simply use the readdir syscall command to read an entire directory and format it in a stem.
  2. The opendir service opens a directory so that the first rddir service (see rddir) starts reading at the first entry in the directory.
  3. RETVAL is a file descriptor for a directory only. It can be used only as input to services that expect a directory file descriptor. These services are closedir, rewinddir, and rddir.

Example

To open the directory /u/edman:
"opendir /u/edman"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014