So, from the top: DSPF - RSTDSP(*YES), SHARE(*YES)
Call RPG1 opens DSPF includes all display formats, it loads up subfile1 (I watch it read the records from file and write them), screen is displayed, look at displayed subfile data and it's all good. Press function key that calls RPG2, this is the program that shares the DSPF, it does NOT include subfile1. Return to RPG1, subfile1 is read in and each line updated to the database file - we're still all good at this point. I press <ENTER> which proceeds to detail line #2. Subfile1 is cleared and once again loaded from file with records pertinent to line#2 (and yes I watch it through debug). The subfile is displayed on screen and I confirm that the data is all correct. Press function key to call RPG2, return back to RPG1, and when it reads the data from the subfile it's the records that were in Subfile1 when RPG2 was called the first time.
Is RSTDSP causing me problems? The fact that RPG2 does not include subfile1? I've never tried to code stuff like this before - basically the original programmer is using subfile2 as an array parameter between RPG1 & RPG2 - but something is screwing up my data, and it's causing the kind of problems that cost lots of money!