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