if 01<code>60 then code_error=1;
G' day!
I inherited code that checks the range of a variable, example above.
This variable, code has a length of 2 and is character with leading zeroes: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, etc.
If a code exists that is 61, then the SAS program identifies it as being >60 and the code_error=1.
But, my question is: is it's a character variable with leading zeroes, how does SAS know whether the variable value is <01 (i.e., 00) or <60?
Thank you!
Recommendation: Fix the code. It's just plain bad code. Would you know how SAS would handle these bad data values?
"7" (instead of "07")
"3A" (instead of "30")
It's better to fix the code than to try to think of all the possibilities where the code might give the wrong result.
Recommendation: Fix the code. It's just plain bad code. Would you know how SAS would handle these bad data values?
"7" (instead of "07")
"3A" (instead of "30")
It's better to fix the code than to try to think of all the possibilities where the code might give the wrong result.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.