In reply to Stu.

Great question. If you are reading local data sets from your PC, it probably doesn't matter which option you use. However, if the data are on a remote server, in a database, or in the cloud, I recommend the WHERE= data set option. When you use the WHERE= data set option, SAS has the option to push the query to the server or database. Only those observations that satisfy the query are sent over the network to be processed. This is called "in-database processing."

In contrast, if you use the WHERE statement, all observations are sent across the network and those that do not satisfy the query are discarded. If the network is slow or transferring data is expensive, you should use the WHERE= data set option, which is more efficient.

In SAS Viya, this becomes even more important. If your data are in the cloud, you want the computations to occur in the cloud. You do not want to write a DATA step that brings a billion observations to the SAS client, only to discard many of them by using a WHERE statement.