That's certainly the way DISP and ENQ work, and it is appropriate in many cases, but there is utility in supporting single writer multiple reader serialization as unix-like systems do. There's also a place for micro serialization.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Farley, Peter <[email protected]> Sent: Friday, June 26, 2026 1:58 AM To: [email protected] <[email protected]> Subject: Re: REXX and O_APPEND External Message: Use Caution I would think that a file opened with O_APPEND (same as for DISP=(MOD,…) in JCL) should be allocated exclusively to the first process where the open succeeds and that process should keep exclusive control of that file/stream until it issues a close. All other processes that issue an open for the same file/stream after the first one succeeds should get an error until the first process releases control via close. Peter From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Paul Gilmartin Sent: Thursday, June 25, 2026 8:42 PM To: [email protected] Subject: REXX and O_APPEND <https://urldefense.com/v3/__https://www.ibm.com/docs/en/zos/3.2.0?topic=functions-rexx-io__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!N6mSOxzwWkYazRF1K-8ir8aX0kvobaWND8Ka4KfzkVqqdbsJXoQQXB2JDzLV-K3UHVk0WP_G8hRaZZEwtjcpyBLiEmaQ5-pf6XXwYV_e$<https://urldefense.com/v3/__https:/www.ibm.com/docs/en/zos/3.2.0?topic=functions-rexx-io__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!N6mSOxzwWkYazRF1K-8ir8aX0kvobaWND8Ka4KfzkVqqdbsJXoQQXB2JDzLV-K3UHVk0WP_G8hRaZZEwtjcpyBLiEmaQ5-pf6XXwYV_e$>> In REXX, the concept of persistent and non-persistent (or transient) streams is closely tied to how these input and output functions interact with the stream. If a stream is explicitly opened using the STREAM() function, it becomes persistent, meaning that it retains its position and state across multiple function calls. Suppose multiple processes open the same file with optuon O_APPEND. That option requires that each write be done at the end of file at that tine, not at a "retain[ed] position." This requires a clarification. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- 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
