> A hint - the IEANTRT parameter storage may reside right in the
caller's
> savearea. IEANTRT is documented to not alter R2-R13 [that's 48 bytes!]
> while the 16-byte TOKEN-NAME area [input parm] can also be reused for
the
> returned TOKEN-VALUE.

More to the point, IEANTRT doesn't alter the save area at all. It uses
the linkage stack, so all but the first 8 bytes of the save area are up
for grabs as working storage and you can even cheat on that by saving
the back chain pointer in a gpr. It's even easier on a 64bit box.

> Cumbersome? Yes, but eliminates the need for a STORAGE OBTAIN

Well if they already -have- a save area of their own, then they
presumably have already done a STORAGE OBTAIN (or whatever technique
floats their boats) and they can probably spare a few extra bytes for
parameter lists and return areas for IEANTRT. Those would be the
sensible ones. 

If they only have their own -caller's- (unused) save area, then
presumably they too have saved the caller's state on the linkage stack,
so they can freely use all but the first 8 bytes of the caller's save
area - 64 bytes. While harmless, that sort of thing tends to be a bit
terrifying for most folks which is why I did not suggest it. 

Now for those heroic types who like to live on the edge and don't mind
some linkage stack antics, you can even pull it off with an existing
-used- save area. Make a little space in the save area by sucking up the
saved caller regs into general regs. Then plunk down a new stack entry
and use the (now "available") caller's save area as the work area for
your IEANTRT call.

When you're done, pop the stack entry and juggle the parts you need from
the save area into general regs and store the caller's saved regs back
in the save area... It is ugly and all but un-maintainable and if you
happen to abend while the save area is gorfed-up you will drive the poor
support person out of their mind, but it's effective and still a lot
faster than obtaining more storage from the OS.

(Oh, did I forget to mention I've been there and done that?)

CC

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to