If the file is reasonably small (less than 100,000 records) and the program using it is run infrequently the opnqryf would probably be better. An advantage of opnqryf is that you can put select criteria in it based on responses keyed on a screen. Jim Sloan’s TAATOOLs has a command to easily create the selection criteria. An example where I used it is:
BLDQRYSLT QRYSLT(&QRYSEL) SELECT((TKBDT *GE &BEGDAT) +
(TKBDT *LE &ENDDAT))
OPNQRYF FILE((ACP0101F)) FORMAT(ACP0101F) +
QRYSLT(&QRYSEL) KEYFLD((TKCMPY) (TKTOPL) +
(TK#30) (TKPCOD) (TKFRPL) (TKBDT))
The & fields are fields from my screen. The other fields are from the file being processed. Good luck.