Examples Using Remote Library Services (RLS) |
Purpose |
In client/server jobs where data must be kept current and the number of updates that you need to perform is small, RLS can be an effective solution. RLS enables you to perform a client update to a server data set.
This example creates a data set by remotely submitting a DATA step. Next, it creates a client transaction data set. Using RLS, it assigns a client libref to the server library. Finally, the program uses the client transactions to modify the server data set.
Program |
%let rsession=unxhost; signon remote=rsession; rsubmit; 1 data sasuser.my_budget; length category $ 9; input category $ balance; format balance dollar10.2; datalines; utilities 500 mortgage 8000 telephone 1000 food 3000 run; endrsubmit; 2 data bills; length category $ 9; input category $ bill_amount; datalines; utilities 45.83 mortgage 649.95 food 68.21 run; 3 libname rlslib slibref=sasuser server=rsession; 4 data rlslib.my_budget; modify rlslib.my_budget bills; by category; balance=balance-bill_amount; run; 5 data _null_; set rlslib.my_budget; put 'Balance for ' category @25 'is: ' balance; run; 6 signoff;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.