Wednesday, March 06, 2013

The logic operation with %IF

The logic operation with %IF of SAS Macro

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:

3 comments:

Priya Kannan said...

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

Unknown said...

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

karthick said...

Its a good post and keep posting good article.its very interesting to read.

R Programming Training in Chennai