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 techniques and/or procs do you use for tables? : Sas programming

1012


how will you locate the sas platform applications? : Sas-bi

990


What do you know about sas and what we do? : sas-grid-administration

1071


what are several options for creating reports in web report studio? : Sas-bi

1094


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

1019


What are the data types that sas contain?

1129


how can you put a "trace" in your program? : Sas programming

1012


What is the difference between proportion and average?

3278


Tell me more about the parameters in macro? : sas-macro

1017


how to do user inputs and command line arguments in sas?

2991


for what purpose would you use the retain statement? : Sas programming

1034


explain about sas business intelligence? : Sas-bi

1086


What is the use of divide function?

1022


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

1286


In ARRAY processing, what does the DIM function do?

1125