You have code that assigns a missing value with every DATA step pass. Suggest you might want to add this line of code for self-debugging and some desk-checking of your program (add multiple occurences and assign unique nn to keep track where your program is generating the diagnostic messages to the SAS log):
PUTLOG '>DIAG-nn' / _ALL_;
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic/post:
data step programming retain statement site:sas.com