Thanks Jerome! It’s not my program. This “simple” program was written by our director, who doesn’t code much anymore… I would have used GET logic with MULTI-FETCH if conditional, or better yet split into 2 programs as you suggested if unconditional.
Regarding the MF factor of 10 or 15: I didn’t express it well. I always use 10 - optimal per Jim Poole who trained me in ADABAS internals at MCI where we both worked a lifetime ago. The exception was if you knew you were reading 15 records to populate a screen, then use 15, or 7 for a week’s worth of daily records… Before and since those few years working as a DBA, I’ve worked mostly as a developer in Natural with some Assembler - I modified the SAG NATCICS interface program for some special requirements at a bank I worked at when upgrading CICS and NATURAL. So I haven’t kept current on ADABAS internals in the last 25 years.
I too thought ADABAS would ignore MULTI-FETCH if an update referenced the read. The exception would be using GET logic for the update. But this situation calls that into question.
And I was wrong about it being a conditional delete: It’s deleting all records earlier than a certain date (ESCAPE logic). The ET logic follows the delete, just before the END-READ.
Regarding “ET based on records read, not records deleted”, I don’t understand: If using GET logic, wouldn’t it only hold the records deleted or updated?
Again, I like the two program solution best: Clean, it allows a review of records to be deleted…
Regarding ADABAS buffers, automatically adjusting the buffer size makes perfect sense, but I thought I remembered something about it using WORK if the calculated buffer size was above a certain threshold… I’m old and probably confused about this.
Again, thanks so much for your prompt reply!