IMHO it would be easier (and probably more maintainable) to use MetalC to set up a model BPAM DCB / DCBE and copy it to malloc24 storage (and the DCBE should you need it to malloc31 storage), and return the malloc24'ed DCB address after optionally linking the DCBE to it, if needed/wanted.
I've done this sort of thing for QSAM DCB/DCBE along with OPEN, CLOSE, GET/PUT MOVE, and GET/PUT LOCATE subroutines, and it works nicely. But not tested in an LE environment, just standalone stuff with a MetalC main program. Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Larry Slaten Sent: Wednesday, July 14, 2021 10:45 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Mixing C/C++ with LE-conforming IBM HLASM 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? ---------------------------------------------------------------------- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN