IMHO this is not a good idea, because the C/C++ runtime probably
did more things than simply construct a DCB and open it; IMO it allocated storage for buffers etc., too. And if you "steal" the open DCB from it, you will leave the C/C++ runtime in an undefined state, at best, even if you plan not to use the C/C++ file functions after the fopen() call;
you will have a storage leak IMO.

And: no, I have no idea how to get the DCB from the C/C++ FILE structure.

(I am a compiler maintainer myself, and I cannot imagine someone successfully using the DCBs, which are part of my Pascal File control structures, and doing I/O using them,
this way "fooling" the Pascal runtime system ... but, who knows).

Kind regards

Bernd


Am 14.07.2021 um 16:44 schrieb Larry Slaten:
I am attempting to use the C/C++ FOPEN function to open a SYSLIB DD pointing to a concatenation of executable libraries.  Then extract the DCB address so that I can use it to populate the LOAD and BLDL macro.  This would make it easier to keep the root program RENT. I realize that I can code the DCB in the root assembler program and do what is necessary to keep the program RENT.  But, using the C/C++ functions would make it simpler.  I have used the FOPEN function to open the data set, retrieved the file pointer.  The file pointer points to another 31-bit address. I have dumped the storage around that 31-bit address, it still doesn't look like a DCB.  I  do see "SYSLIB" at +84 bytes, so I appear to be close to the answer.  Does anybody know to obtain the DCB address using the file pointer returned by FOPEN?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to