On Tue, 13 Dec 2022 08:31:55 +0000, 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. I can no longer find in either the JCL Ref. or Using Data Sets
statements to the effect that:
o Job step initiation opens the file with the options on the DD statement.
o It is then the responsibility of the application program to re-open the
file with the *same*options*.
- less O_EXCL, which would cause the second open() to fail.
- presumably fetching the opeions with DYNALLOC INFO?
- I assume the "application program" usually means the OPEN macro
invoked by the access method.
An example in the doc would be valuable.
Does an open( , O_TRUNC ) not actually truncate the file, but defer the action,
to be performed by an implied seek() at the first write()? (Does a DD
allocation
OTRUNC in an IEFBR14 step not truncate the file at the initial open()?)
A Service Request to the maintainer of the code (yourself?) might be
appropriate.
--
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN