define the file as Input Primary and let the OS handle the File I/O, instead of doing READ or CHAIN.
fFileName IPE Disk
c field_1 ifeq field_2
c —— do something ——
in this manner, the file is read by RRN and the program handles all of the file I/O and automagically sets on last record indicator.