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
What is the work of tranwrd function?
Do you know the features of sas?
Give some examples where proc report’s defaults are different than proc print’s defaults?
what are several options for creating reports in web report studio? : Sas-bi
How long can a macro variable be? A token? : sas-macro
What are the statements that are executed only?
What are the different servers in sas? : sas-grid-administration
How do you specify the number of iterations and specific condition within a single do loop?
how are numeric and character missing values represented internally? : Sas programming
What can be the size of largest dataset in SAS?
hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?
what is the Population you used in your project, is it ITT or PP?
If a variable contains only numbers, can it be a character data type?
Explain input and put function?
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di