You still have SAS log missing from your post-reply. Again, suggest you diagnose your program in detail by adding the suggested PUTLOG statement and you will want to debug it for both DATA steps. Break down your SAS processing into sequenced steps and analyze/debug them one at a time, working towards your desired output -- don't proceed to the next step until your confident with each successive PROC or DATA step -- remember, you know your data and your processing needs better than others (and you're closer to the data, as well). I tend to want to guide individuals on these forums rather than pushing code their way -- the SAS learning experience goes much farther that way.
Scott Barry
SBBWorks, Inc.