I have used the SAS for many years; I use the simplified statement for logic comparison in the data step without any problem; the codes, for example, can be IF 18 <= age <= 80 instead of IF age >=18 AND age <=80. However, today I've used hours to figure out a logic problem when I use %IF in the same for SAS macro codes. To get the correct answer of logic operation using %IF, we must use the more standard way (age is a macro variable in the following example): %IF &age>=18 AND &age<=89 %THEN %DO; ......; %END.
Relative articles:
- Solving Problems with Expression Evaluation (page 131) - SAS 9.2 Macro Language Reference.
- If and %IF You Don’t Understand by lan Whitlock on the webiste of SESUG Proceedings 2010.
5 comments:
This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful. R Language Training in Chennai
Great blog..Well explained,it was really informative and useful.Thanks for sharing..keep update big data training in Velachery | Hadoop Training in Chennai | big data Hadoop training and certification in Chennai | Big data course fees
Its a good post and keep posting good article.its very interesting to read.
R Programming Training in Chennai
Highly Interesting Data science training in Banglore
Useful Information has been Conveyed
<a href="https://intellimindz.com/flutter-training-in-bangalore/”>
flutter training in Bangalore</a>
Post a Comment