Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In the SAS Data step what is the difference between the
subsetting done by Where and subsetting done by If?

Answer Posted / gangadhar

Make sure you apply the following rules when determining
which approach to take when subsetting your data set using
the DATA step. If your subset condition does not meet the
requirements below, then the WHERE and IF statements should
produce identical results. For cases such as this, use the
WHERE statement since it is more efficient. Note that
having both WHERE and IF statements within the same DATA
step has a cumulative effect.
• Can use WHERE statement when only specifying data
set variables
• Use IF statement when specifying automatic
variables or new variables created within DATA step
• Use IF statement when specifying FIRST.BY or LAST.
BY variables
• Use IF statement when specifying data set options
such as OBS = , POINT = or FIRSTOBS =
• In general, use IF statement when merging data sets
to apply subset condition after merging data set
• Use WHERE statement when specifying indexes

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do the PUT and INPUT functions do?

1268


what is business intelligence? : Sas-bi

1014


Explain why double trailing @@ is used in input statement?

1007


how many types of prompts are there? : Sas-bi

1032


what is sas business intelligence? : Sas-bi

1091


What is the use of the %include statement?

1084


What is the difference between %put and symbolgen? : sas-macro

1158


How are numeric and character missing values represented internally?

1604


What sas features do you use to check errors and data validation?

1160


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2401


Mention some common errors that are usually committed in sas programming.

996


what are sas bi dashboard components? : Sas-bi

1113


How long can a macro variable be? A token? : sas-macro

1155


How would you invoke a macro? : sas-macro

1041


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

1033