Re: DD PATHOPTS OTRUNC extending

2022-12-13 Thread Paul Gilmartin
On Fri, 9 Dec 2022 08:54:03 +, Ian Worthington wrote: >When I run JCL with >//PCAPFN DD PATHOPTS=(OCREAT,ORDWR,OTRUNC),   >// PATHMODE=..., PATH=...     // FILEDATA='BINARY' > >any existing file gets extended.  Yet >https://www.ibm.com/docs/en/zos/2.4.0?topic=definition-status-group >

Re: DD PATHOPTS OTRUNC extending

2022-12-13 Thread Paul Gilmartin
On Tue, 13 Dec 2022 13:07:39 -0600, Kirk Wolf wrote: >It's not surprising that the C library is able to override the DD (JFCB) at >open time. >https://www.ibm.com/docs/en/zos/2.1.0?topic=processing-filling-in-dcb > >I don't think that IBM documents this very well for DD: that reference >PATH

Re: DD PATHOPTS OTRUNC extending

2022-12-13 Thread Kirk Wolf
It's not surprising that the C library is able to override the DD (JFCB) at open time. https://www.ibm.com/docs/en/zos/2.1.0?topic=processing-filling-in-dcb I don't think that IBM documents this very well for DD: that reference PATH specifications. Kirk Wolf Dovetailed Technologies, LLC htt

Re: DD PATHOPTS OTRUNC extending

2022-12-13 Thread Paul Gilmartin
On Tue, 13 Dec 2022 08:31:55 +, Ian Worthington wrote: >Your suspicions were quite correct.  After some futzing around the opening >logic finally does: > > if ((pcapfd = fopen("DD:PCAPFN", "ab+,lrecl=1")) == NULL) { > >which looks like it must takes precedence over the OTRUNC. > Interesting

Re: DD PATHOPTS OTRUNC extending

2022-12-13 Thread Ian Worthington
Your suspicions were quite correct.  After some futzing around the opening logic finally does: if ((pcapfd = fopen("DD:PCAPFN", "ab+,lrecl=1")) == NULL) { which looks like it must takes precedence over the OTRUNC. Many thanks for pointing me in the right direction. Best wishes / Mejores dese

Re: DD PATHOPTS OTRUNC extending

2022-12-09 Thread Paul Gilmartin
On Fri, 9 Dec 2022 08:54:03 +, Ian Worthington wrote: >When I run JCL with >//PCAPFN DD PATHOPTS=(OCREAT,ORDWR,OTRUNC),   >// PATHMODE=..., PATH=...     // FILEDATA='BINARY' > >any existing file gets extended.  Yet >... > - OTRUNC > - Specifies that the system is to truncat

Re: DD PATHOPTS OTRUNC extending

2022-12-09 Thread Paul Gilmartin
On Fri, 9 Dec 2022 08:54:03 +, Ian Worthington wrote: >When I run JCL with >//PCAPFN DD PATHOPTS=(OCREAT,ORDWR,OTRUNC),   >// PATHMODE=..., PATH=...     // FILEDATA='BINARY' > >any existing file gets extended.  Yet > What program did you name on the EXEC PGM= statement? It's possible

DD PATHOPTS OTRUNC extending

2022-12-09 Thread Ian Worthington
When I run JCL with //PCAPFN DD PATHOPTS=(OCREAT,ORDWR,OTRUNC),   // PATHMODE=..., PATH=...     // FILEDATA='BINARY' any existing file gets extended.  Yet https://www.ibm.com/docs/en/zos/2.4.0?topic=definition-status-group  clearly states that: - OTRUNC - Specifies that the s