I would compare the code in this program with another one of yours that has a working subfile.
The main things I would compare are:
o What is the sequnece of my WRITE, READ, READC, EXFMT instrucitons
o What indicators are on/off when these are happing.
Sometimes I copy an the source form an old DSPF and use it with code I copied from a newer RPG program and I have problems. The “Standards” changed over time as to what indicatiors I use in the DSPF for conditioning the SFLxxx keywords.