In the SAS Data step what is the difference between the
subsetting done by Where and subsetting done by If?
Answer Posted / govardhan bandari
IF-Works With New Variable
Where- Cant work With New Variables
IF-Works After PDV
Where-Works Before PDV
IF-in backend if process all the variable and it gives output based on condition
BUT
Where-process only conditionally met obseravtions
IF-Cant work with proceduers(except proc report with compute statement)
WHERE- work with proceduers
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between order and group variable in proc report?
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
How we can create SAS USER DEFINED CODE?
What are the difference between sas functions and procedures?
how to do user inputs and command line arguments in sas?
What is the maximum length of the macro variable?
Tell me about % include and % eval? : sas-macro
what is the primary data source for the wrs? : Sas-bi
what can you learn from the sas log when debugging? : Sas programming
How can sas program be validated?
Explain data step in SAS
what is the use of sas management console? : Sas-di
How do you debug and test your SAS programs?
what are some differences between proc summary and proc means? : Sas programming
How to create list output for cross-tabulations in proc freq?