Right. Honest, I was not trying to be obscure or overly clever.

What I do in all of my xSAM/BPAM code is code all of the DCB's and DECB's and 
other RMODE 24 stuff in its own CSECT (and sometimes, just because it organizes 
the code better, even other small things that do not HAVE to be RMODE 24 like a 
DCBE). I then do a GETMAIN 24 at run time for the length of the CSECT and copy 
all of the QSAM "stuff" into the GETMAIN area. With some cleverness you can 
then use the CSECT like it was a DSECT for addressing the tables in the GETMAIN 
area. Sometimes you have to manually relocate a couple of address constants, 
like the DECB pointer to the DCB.

However, I don't think I copy any BUFCB's anywhere. I think QSAM automatically 
allocates the BUFCB wherever it chooses (presumably it chooses RMODE 24) and 
the buffers wherever you tell it to allocate them (RMODE ANY in my case). Am I 
confused?

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Bill Godfrey
Sent: Monday, June 03, 2013 12:11 AM
To: [email protected]
Subject: Re: Examples of getbuf and build usage

It can be done that way, you are right, but I figure if the OP's program is 
using BUILD and GETBUF then my statements may prove to help him with his 
problem, and that's my reason for posting what I did, to help the OP. I could 
have qualified my statement by adding saying "unless the program is copying the 
BUFCB (and not the buffers) below the line" but I thought "but who does that?" 
Well, now I know who does that, or something like that.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to