Example 2. RLS: Accessing Server Data by Using the WHERE Statement


In this example, WHERE statement processing modifies the previous example in order to reduce the amount of data that is being requested and to reduce the network traffic. The WHERE statement filters only the relevant data for the client to process. A selective transfer is more efficient than moving every observation to the client to process and to check the COPY variable for a Y value.


   signon rempc;
 libname public 'c:\Public' server=rempc;
 data _null_;
      set public.request;
      where copy = "Y";
      put "Report " report_name 
         " has been requested";
1 Defines a server library to a client session.
2 Uses the WHERE statement to filter unneeded observations.