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...

Under what circumstances would you code a SELECT construct
instead of IF statements?

Answer Posted / sonu

The SELECT statement begins a SELECT group. SELECT groups contain WHEN statements that identify SAS statements that are executed when a particular condition is true. Use at least one WHEN statement in a SELECT group. An optional OTHERWISE statement specifies a statement to be executed if no WHEN condition is met. An END statement ends a SELECT group.
Null statements that are used in WHEN statements cause SAS to recognize a condition as true without taking further action. Null statements that are used in OTHERWISE statements prevent SAS from issuing an error message when all WHEN conditions are false.
Using Select-When improves processing efficiency and understandability in programs that needed to check a series of conditions for the same variable.
Use IF-THEN/ELSE statements for programs with few statements.
Using a subsetting IF statement without a THEN clause could be dangerous because it would process only those records that meet the condition specified in the IF clause.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the ways in which you can create macro variables? : sas-macro

1009


What are the scrubbing procedures in sas?

945


what is proc Index? and what is proc document?

2628


what is metadata? : Sas-bi

964


how can you create zero observation dataset? : Sas programming

1084


What is the difference between SAS functions and procedures?

1094


how do you test for missing values? : Sas programming

989


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

1166


how could you generate test data with no input data? : Sas programming

1109


What is the difference between INPUT and INFILE ?

1236


What are the applications primarily used by business analyst? : Sas-bi

941


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1476


What is the use of stop statement?

1013


What are the differences between proc means and proc summary?

1064


what do the pad and dim functions do? : Sas programming

958