> The DCB keeps state.

I know that very well, but that wasn't the question. The question was "is
name/token create/retrieve better performing than GETMAIN/FREEMAIN (or
STORAGE OBTAIN/RELEASE)?"

There are lots of situations where a function might need QSAM in 24-bit
storage but not need to save state (save a DCB) across calls:

- a function that opened, read, and closed a dataset and "summarized" the
results in some way for the caller.
- a function that copied one dataset to another.
- a function that issued RDJFCB, returning the JFCB to the caller (yes, I
know there are other ways to get a JFCB)
- in the function that is currently on my plate, the DCB is used with ATTACH
and is opened and closed within a single call to the function.
- there's another one on my plate in which a DCB is opened and closed within
a single call, but it's too complicated and distracting to explain the
purpose in an e-mail.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf
Of Binyamin Dissen
Sent: Monday, February 22, 2010 6:24 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Best practice for 24-bit storage in assembler called from C/C++

On Mon, 22 Feb 2010 06:14:16 -0800 Charles Mills <charl...@mcn.org> wrote:

:>> You can anchor in name/token.

:>Considering just functions that require a 24-bit work area and do not need
:>to preserve state across calls, is name/token create and retrieve going to
:>be significantly better performing than FREEMAIN and GETMAIN?

:>(A serious question -- I don't know the answer.)

The DCB keeps state.

:>-----Original Message-----
:>From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
Behalf
:>Of Binyamin Dissen
:>Sent: Monday, February 22, 2010 12:07 AM
:>To: IBM-MAIN@bama.ua.edu
:>Subject: Re: Best practice for 24-bit storage in assembler called from
C/C++

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

:>...

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

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