Well, at a guess, as I am not typing in all that test data, I would say that your TEMPx value doesn't resolve in any of the if statements, hence it would be missing. This could be for a number of reasons, the first I would check is that your values are *exactly* 0.1 etc. Sometimes SAS hides fractional parts. So change your if statemetns to a range e.g: if 0.70 < temp{i} <= 0.8 then do; The next bit to check is the second if statement doing this: if C02 in (.B,.D,.G) then r{i}=27; What is .B etc? Maybe provide some test data (in the form of a datastep with datalines) as there is no clear indication of what formats Rx/Tempx are.
... View more