If the same DCB is closed and reopened, the 24-bit buffers left behind from 
the previous OPEN that were not FREEPOOLed will be reused. So if the same DCB 
is closed and reopened, there is no storage lost (until the last CLOSE).

If the DCB is being refreshed each time (in a work area or the program is 
getting loaded and deleted each time), then a FREEPOOL is necessary to prevent 
the loss of storage. The original design in the 60s more or less assumed that 
after CLOSE the program (TCB) would end which would free the storage or that 
the DCB was going to be reopened, so overhead was reduced by not freeing the 
buffers that might be reused.

When 31-bit buffers were implemented, they did not perpetuate this design.

Keith Moe
BMC Software
     On Thursday, July 11, 2019, 7:45:15 AM PDT, Seymour J Metz 
<sme...@gmu.edu> wrote:  
 
 FREEPOOL has always been a requirement for a straight QSAM DCB; with a DCBE 
you can make it automatic on CLOSE.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> on behalf 
of Jon Perryman <jperr...@pacbell.net>
Sent: Thursday, July 11, 2019 12:17 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Probably dumb assembler question

I agree with Mike that your storage leak may be somewhere else. When did 
freepool become a requirement? I don't see anything in the code referencing a 
buffer. If it is dynamically using a buffer pool, then the buffers should be 
returned to the pool upon close and the next open should reuse that buffer.
You can easily find out if this code is the problem. Create a small program 
using this code and loop 20,000 times. Be sure to link it rmode 24 in case DCB 
has some sort of 3 byte adcon pointing back to the original DCB area.
You bypass close if open rc is not 0. Are you getting a non-zero rc that still 
opens the dataset and bypassing the required close?
You mentioned "error". Does that mean you have an abend recovery routine?
Jon.
  On Wednesday, July 10, 2019, 03:19:01 PM PDT, Phil Smith III 
<li...@akphs.com> wrote:
 Charles Mills (and others) wrote about using FREEPOOL and/or RMODE31=BUFF. I 
will dig into those.

.phsiii  

Reply via email to