On Sun, 21 Feb 2010 18:00:19 -0800 Charles Mills <charl...@mcn.org> wrote:

:>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.

:>Obviously I could do a GETMAIN or STORAGE OBTAIN LOC=24 on the way in and
:>FREEMAIN or STORAGE RELEASE on the way out. But that's less than optimal for
:>a routine that is called multiple times. (And it would not work at all if
:>the routine had to save state across calls, but fortunately that is not the
:>case, at least for my requirements so far.)

:>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.

:>Is there a better way? Is there some sort of "anchor word" where a library
:>of called assembler routines could save an address across calls? Is this
:>what CEECAA_TCASRV_USERWORD in CEECAA is for? Does R12 reliably point to the
:>CEECAA on entry? Can I count on CEECAA_TCASRV_USERWORD being initialized to
:>zero? Where is this stuff documented? I don't see much in LE Programming, in
:>LE ILC, or in the C/C++ Programming Guide.

:>Is there some "LE-supported" solution to the whole problem, such as a "below
:>the line stack" feature that an individual function (but not the whole
:>application!) could utilize?

You can anchor in name/token.

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
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

Reply via email to