Loading...
https://basesasonlinetraining.blogspot.com/2015/07/Difference-between-if-and-where.html
One can subset dataset using IF or WHERE
statement to select specific observations from existing SAS data sets in order
to create a new SAS data set that includes only some of the observations from
the input data source.
Let us explore difference between IF and WHERE
at the ground level, below figure will explain processing of IF and WHERE at
PDV level.
As shown in the figure, WHERE conditions are
applied before the data enters the input buffer while IF conditions are applied
after the data enters the program data vector. This is the reason why the WHERE
condition is faster because not all observations have to be read and because it
can only be applied on variables that exist in the input data set.
Since WHERE is applied before PDV so it
makes automatic and new variables created in data step inaccessible to WHERE
statement, following table will summarize conditions where IF and WHERE
statements can be used –
VirtualNuggets
491723618489834147
Post a Comment
Home
item
Blog Archive
Popular Posts
-
Base SAS software contains the following: A data management facility A programming language Data analysis and reporting utilities ...
-
1. The SAS data set EMPLOYEE_INFO is listed below: IDNumber Expenses 2542 100.00 3612 133.15 2198 234.34 2198 111.12 The...
-
In this blog post, we'll get to know the use of iterative DO loops, in which you tell SAS to carry out a statement or a group of state...
-
Informats are typically used to read or input data from external files called flat files (text files, ASCII files, or sequential files...
-
1.)The following SAS program is submitted: data work.new; length word $7; amount = 7; if amount = 5 then word = 'CAT';...
-
One can subset dataset using IF or WHERE statement to select specific observations from existing SAS data sets in order to create a new...
-
Elements of the SAS Language The statements that formed the data set WEIGHT_CLUB are part of the SAS programming language. The SAS...