-127 usually means the db path is incorrect. Not quite sure what "every time I run a program" means but if you are running pcdmis and performing a STATS command, ANY error will result in the XSTATS11.TMP file not being deleted. If you do not need that information you can delete the file, make sure the DB path in the pcdmis program is correct.
Nothing seems to work. Everytime the program finishes I get about 24 warning boxes I have to clear. The data gets into the folder and is usable , but the error msgs keep popping up.
A common issue in datapage is with number of characters in your file name. If I went over 24 to 28, I would always get errors. Datapage is supposed to allow at least 36 characters but it does not.
Not sure where you are getting the 28 from but:
24 - max part name
24 - max variable name
14 - max trace name
14 - max trace value
Anything longer will be truncated to this length.