To add to Khadar’s response below, you might want to think of using the OVRDBF with a KEYFLD parameter on a field in the PF, which you can use as a keyed PF in your RPG(LE) pgm.
You can define the file without a key on your F spec, which will allow you to process the file by relative record number. You can then SETLL and SETGT using record number as the key. Normally you would SETLL with 1 to get to the start of your file and read from there on.
Your other option would be to build a logical file over your physical and use the logical in your RPG.
You can use a CL-Command to point like this :–
OVRDBF FILE(File-name) TOFILE(Library/File-Name) POSITION(*star/*END/*RRN)
You can point like this way.
Typically when a file is open you are at the beginning
You can use the read command to read one record at a time
and loop to process all of the records.
If you need specific records check for logical files using the command DSPDBR.
Create a logical if the number of records is large and/or you need the data is a specific sequence.
You can also process this file using SQLRPGLE.