Don’t open the file until you need it:
The OPEN and CLOSE instruction generates a lot of excessive code, so the recommendation is to always put all of your files in the same OPEN and the same CLOSE. Well the default number of buffers in MVS is 5, so each file you open will consume 5 times the block size in “REAL Memory”.
This means that you have less available Memory for your job and other jobs that are running. This means that MVS has more of a challenge to divide up the resources.
It becomes more time consuming and more “staging drive” I/O bound when you have inefficient programs. So open that control file, read the record, then close it before you proceed to the main logic of the program. And if you have an internal SORT, then it is obvious, you don’t need all of those files open in both of the exits.