You’ll have to do an OVRDBF with SHARE(*YES) and then the COBOL will still need the OPEN. It’s just that the OPEN won’t really have to do anything when it’s executed. i.e., no open data path (OPD) will be created.
The OPNDBF will create an ODP. If shared, the COBOL OPEN can use the same ODP, so a second full-open won’t have to be done. Full opens are relatively expensive (performance) operations.
OPNDBF can be used to create an ODP for any number of programs that will be called later in the job. That includes programs that might be called many times in a loop.
OPNDBF can also be used to create an ODP that can handle all types of opens — input only, output only or both. That means the later programs can still use the same ODP even if they’re doing different kins of operations.
For jobs that need to do many OPENs of particular files, setting the ODP early in the job, high in the call stack, performance can be significantly improved. Elements such as positioning in the file must be watched because a single ODP can only maintain a single position. Programs need to be sure that the next record to read or the record being updated will be the intended one.