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 is program data vector (pdv)?

1388


What are the advantages of using sas?

1189


Where do you use proc means over proc freq?

1188


What are the data types that sas contain?

1248


What is the difference between order and group variable in proc report?

1480


Have you ever used the SAS Debugger?

1819


Give some ways by which you can define the variables to produce the summary report (using proc report)?

1134


What is the order of application for output data set options, input data set options and SAS statements?

1618


What can be the size of largest dataset in SAS?

1275


Are you involved in writing the inferential analysis plan? Tables specifications?

4004


how many display types available in sas bi dashboard? : Sas-bi

1141


how does sas handle missing values in procs? : Sas programming

1346


Explain substr function?

1163


What is the maximum length of the macro variable? : sas-macro

1152


How necessary is it to be creative in your work?

2524