You can use the PATH keyword on a JCL DD statement to specify the
path name for a
z/OS UNIX file.
When you use the PATH keyword, you can also use these keywords:
- PATHOPTS to indicate the access for the file (for example,
read or read-write) and to set the status for the file (for example,
append, create, or truncate). This is analogous to the option
arguments on the C open() function.
Note: If
you specify either OCREAT or OCREAT together with OEXCL on the PATHOPTS
parameter and the file does not exist, z/OS UNIX performs an open() function.
The options from PATHOPTS, the path name from the PATH parameter,
and the options on PATHMODE (if specified) are specified in the open().
z/OS UNIX uses
the close() function to close the file before
the application program receives control.
- PATHMODE to indicate the permissions, or file access attributes,
to be set when a file is being created. This is analogous to the
mode arguments of the open() function.
- PATHDISP to indicate how MVS™ should
handle the file when the job step ends normally or abnormally. This
performs the same function as the DISP parameter for a data set.
If PATHOPTS and PATHMODE are absent from the DD statement, an
application needs to supply defaults for the options and mode, or
issue an error message and fail.