An alternative to IF-THEN/ELSE coding is to use the SELECT statement.It is usually more efficient than IF-THEN/ELSE,especially if you are receding a variable into a large number of categories.There are various forms of the SELECT statement,but the one that does the trick here looks like the following:
As you can see in this example,one or more WHEN statements can be placed between the SELECT and END statements.The statement
following the true WHEN condition is executed.Another useful feature of the SELECT statement is to follow your last WHEN statement with an OTHERWISE statement which is executed if none of the WHEN conditions is true.
There are other,more advanced,features of the SELECT statement which we do not cover here.The code above yields the same
output(except for the title) as Example 1.
SAS Programming Related Tutorials
|SASS (Syntactically Awesome Style sheets) Tutorial||R Programming language Tutorial|
SAS Programming Related Interview Questions
|Logistics Interview Questions||SAS Programming,SQL server Interview Questions|
|Clinical SAS Interview Questions||SASS (Syntactically Awesome Style sheets) Interview Questions|
|SQL Server Analysis Services (SSAS) Interview Questions||R Programming language Interview Questions|
|SAS DI Interview Questions||Advanced SAS Interview Questions|
|Base Sas Interview Questions||SAS Macro Interview Questions|
|Clinical Data Management Interview Questions|
Sas Programming Tutorial
Input And Infile
Set, Merge, And Update
Table Lookup Tools
Proc Means And Proc Uimivariate
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.