Nested READs & MULTIFETCH

Hello

z/OS. Batch Natural.
PGMA
0010 READ FILE-1 LOGICAL BY …
0020 END-READ
0030 READ FILE-2 LOGICAL BY …
0040 END-READ
0050 END

PGMB
0010 READ FILE-1 LOGICAL BY …
0020 READ FILE-2 LOGICAL BY …
0030 END-READ
0040 END-READ
0050 END

ADARUN PREFETCH=YES
ADARUN PREFTBL=40000
ADARUN PREFSBL=40000

Question #1:In PGMA do file 1 and file 2 participate in the prefetching?

Question #2(the real question): In PGMB do file 1 and file 2 participate in the prefetching?
If Yes - do they each get 40000 for the buffer?
If No - then is it just file 1?

I want to prefetch for both.

Thanks in advance!

DG

In PGMA, a Prefetch buffer is allocated to FILE-1, FILE-1 is prefetched, the buffer is released, a buffer is allocated to FILE-2, and FILE-2 is prefetched.

In PGMB, once a Prefetch buffer is allocated to FILE-1, no space is available for allocation to FILE-2. You need to increase PREFTBL to allow concurrent Prefetching, but you need to test this to determine whether concurrent Prefetching will have a positive effect on run times.

By the way, my understanding of how the Prefetch buffers are allocated is that in PGMB FILE-2 will be Prefetched for the first iteration of FILE-1, and FILE-1 will be Prefetched thereafter, with no subsequent Prefetching of FILE-2. So, technically, both files are Prefetched in PGMB, but FILE-2 for a limited time.