> Don't you want to leave the DCB open between calls? No
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Shmuel Metz (Seymour J.) Sent: Monday, February 22, 2010 8:35 AM To: IBM-MAIN@bama.ua.edu Subject: Re: Best practice for 24-bit storage in assembler called from C/C++ In <003c01cab362$c950c0c0$5bf242...@org>, on 02/21/2010 at 06:00 PM, Charles Mills <charl...@mcn.org> said: >Subject: Best practice for 24-bit storage in assembler called from C/C++ Best practice is for new code to be refreshable and reentrant. >I'm writing a fairly large MVS batch application in C++. At several >points it is necessary to call "library" type routines that I am writing >in assembler. Several of the routines (unfortunately) need to use QSAM >macros and so need below-the-line storage. The issues are the same whether the storage is above the line or below. >Obviously I could do a GETMAIN or STORAGE OBTAIN LOC=24 on the way in >and FREEMAIN or STORAGE RELEASE on the way out. Don't you want to leave the DCB open between calls? >I could make the calling C++ responsible for providing a "work area" >obtained with _malloc24(). But I don't like that for "aesthetic" reasons >- >violates encapsulation, making the caller responsible for the inner >workings of the called function. Not if that storage is a "black box". >Is there a better way? Does LE use a CXD to allocate a pseudo-register vector? >Is there some "LE-supported" solution to the whole problem, such as a >"below the line stack" feature tml ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html