Return z/OS UNIX file options - Key = 'C018'
DINRPOPT requests the return of the options for the z/OS® UNIX file associated with the specified allocation.
When you code DINRPOPT, # must be 1 and LEN must be at least 4 and can be longer, and the PARM field must be the length specified by the value in LEN.
If there are file options associated with the allocation, the system returns the file options in PARM and 0004 in LEN. PARM will contain one of the following values or an "inclusive OR" result from any combination of the following values:
Four-byte Hex Integers | JCL Equivalent |
---|---|
X'00000080' | OCREAT |
X'00000040' | OEXCL |
X'00000020' | ONOCTTY |
X'00000010' | OTRUNC |
X'00000008' | OAPPEND |
X'00000004' | ONONBLOCK |
X'00000003' | ORDWR |
X'00000002' | ORDONLY |
X'00000001' | OWRONLY |
Example: To request the return of the z/OS UNIX file options for /u/myuid/myapp/scr.dat, code:
KEY # LEN PARM
8017 0001 0016 61 A4 61 94 A8 A4 89 84 61 94 A8 81 97 97 61 A2 83 99 4B 84 81 A3
C018 0001 0004 00000000
Output: KEY # LEN PARM
C018 0001 0004 000000C3
The retrieved information indicates a file access mode that is "create the file if it does not already exist with the intent to read and write the file" (the "inclusive OR" expression for OCREAT+OEXCL+ORDWR).