When you paste your screen captures into Microsoft Word, they become extremely difficult to read. Please don't do that any more. Just click on the Photos icon and attach your screen capture that way.
It does not appear that you are showing me MMResids or NEWDAT. But, I still want YOU to look at NEWDAT and see what the values of the variable named RESID are in there. You will probably find out that a variable named RESID is not in there. Is that correct? If it is correct, then you can't use NEWDAT to work with variable RESID.
I created Resid by adding "outp=Resid" (Please see the first code).
Okay, now we seem to have found the problem. OUTP=RESID creates a data set named RESID, it does not create a variable named RESID in NEWDAT. You need to merge the residuals in data set RESID into NEWDAT, or maybe just use data set RESID.
My point here is that you can do a lot of this debugging yourself by looking at the SASLOG and looking at the contents of your data sets. You would have seen immediately that variable RESID is not in MMresids and variable RESID is not in NEWDAT.
... View more