Thanks, gil and Shmuel! I'll pass your comments along to that content's owner for further investigation and any needed updating.

-Sue Shumway


On 4/14/2020 2:27 PM, Seymour J Metz wrote:
I see other problems.

     o By "hex integer" I assume that they mean a binary value, not a string
        of EBCDIC characters feom a-f, A-F and 0-9
     o If SVC 99 does an OPEN, who gets dubbed?

May I assume that if the file does exist, DYNALLOC performs no open()
function?

Yes, unless the manual is missing something.

    For status group options other than OCREAT and OEXCL, the
    description in this information assumes that the application
    passes the values to the open() function without modification.

I'd make that "application directly or indirectly".

What does BSAM/QSAM OPEN do with OCREAT and OEXCL?

Have you checked the DFSMSdfp documentation? There should be information on DCB 
and OPEN for Unix paths.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Paul Gilmartin [[email protected]]
Sent: Tuesday, April 14, 2020 11:26 AM
To: [email protected]
Subject: DALPOPT Documentation

(Cross-posting to IBM-MAIN and MVS-OE)
There's a potential RCF here, but I'd like other opinions.

In:z/OS Version 2 Release 4
MVS Programming: Authorized Assembler Services Guide
IBM SA23-1371-40

     z/OS UNIX file options - Key = '8018'
     DALPOPT specifies the file options for the z/OS UNIX file.
     You can code DALPOPT only when you also code the pathname
     (DALPATH) key.
     If
     • You specify either
     – The hex integers representing OCREAT alone
     or
     – The hex integers representing both OCREAT and OEXCL
     on the DALPOPT key,

I'm visualizing the Venn diagram.  The condition is met
either for OCREAT without OEXCL or OCREAT with OEXCL.
OEXCL doesn't matter and its mention here is a distraction.

     And if
     • The file does not exist,
     Then MVS performs an open() function.

This is the exception that proves the rule.

     The options from DALPOPT, the pathname from the DALPATH key,
     and the options DALPMDE (if specified) are used in the open().
     MVS uses the close() function to close the file before the
     application program receives control.

The following appears to have been written long ago, before there
was access method support for UNIX files.  Nowadays, it's more
likely that "the application" performs the operations indirectly,
invoking BSAM/QSAM via the OPEN macro,  The description should
be expanded to clarify this.

     For status group options other than OCREAT and OEXCL, the
     description in this information assumes that the application
     passes the values to the open() function without modification.

What does BSAM/QSAM OPEN do with OCREAT and OEXCL?  Does it mask
then out, not passing them to open()?  If so, and if as above no
open() is performed by allocation for an existing file, the POSIX
specification:
https://secure-web.cisco.com/1v9RE_EP2USduIGnbDVpBSYleSP70jbEYR3yjYfA6KHK25vdclYQBQc0j-N7OJXG6w7zUzSl69pLMc9OwLEH4aT86MuQpuWRUSsfwi1OVLsLsrJALaBmfJsqzErf3a9KpoWHuGjA57LCADc5X9gtDHqyLlmbCPig1aviQzcLyEWO2EuDd289JVv9nAsldlQ9RSDR6M07mwWVu9LN5nZ9Nffhl6VoxZ8l_uqXxmaH9khkbrrx11EAobQlVG3GPLK1xXsX3rBUzfl_Mhy4tf_YDxur6LOUWv7JHjJiVCezWN17CYu1ec0DB0jtkuhqyFLKprxbJAC6YRVbhNdHKKBNiMMSvMtEIQwJAXkU5X-uBk4sSP7uJ4GbrOSsrBk_LujP4Di_Muj09WjGRG1zwtTKpjyTP8ZVXBOt0RHIvSTa5xtJibiOnKh5oCs6p3R_nwNF1RxQF8UGDG9eC6ZQSGdYfqA/https%3A%2F%2Fpubs.opengroup.org%2Fonlinepubs%2F009695399%2Ffunctions%2Fopen.html
O_EXCL
     If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
is violated because OPEN invokes open() without OCREAT or
OEXCL and that open() succeeds.

     That is, this application uses dynamic allocation information
     retrieval (the DYNALLOC macro) to retrieve the value specified
     for DALPOPT and passes the value to the open() function. The
     application program can ignore or modify the information
     specified in the JCL.

"JCL" should be "DYNALLOC".  Likewise, two uses of "MVS" above
should more precisely be "DYNALLOC".

Much of the information here is duplicated in the JCL Reference
for DD:PATHOPTS.  Any changes here might need to be reflected
in the JCL Ref.

Thanks,
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


--
Sue Shumway
z/OS Project Lead and Client Advocate
IBM Poughkeepsie
[email protected]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to