Operation result with one of the variables null (empty) in SAS
I am converting SAS code to C# code and I开发者_如何学运维 don't have platform to run SAS code, what I have only source code, and I have line of the code in SAS where one of the variables is empty and another is not and I would like to know what would be result of y in following operation.
x = .
y = 10 / x - 1;
x is empty (null) Please advice.
Thanks a lot in advance for your help.
The result will be missing (null in other programming languages). Any calculation with a missing value will return missing.
data _null_;
x = .;
y = 10 / x - 1;
put y=;
run;
y=.
NOTE: Missing values were generated as a result of performing an operation on missing values.
y would also be NA (.)
You might want to look into WPS - it's an interpreter for SAS code that's substantially cheaper than SAS itself, and it has a 30-day free trial. It doesn't cover 100% of SAS, but you could easily use it to test out simple questions like this one.
精彩评论