Using SAS/Connect with WRDS
About WRDS and SAS/Connect
SAS/Connect allows you to communicate with the WRDS Unix server from within a SAS program running on your computer. It works by establishing a connection from within PC SAS to the WRDS Unix SAS. In order to use this technique, you will need a WRDS account. For more information on WRDS and how to request and account, visit theWRDS support pages.
WRDS Current Subscriptions
Establishing a Connection
The first step is to establish a connection. In order to do so, execute the following SAS code within PC SAS:
%let wrds = wrds.wharton.upenn.edu 4016; options comamid=TCP remote=WRDS; signon username=_prompt_;
When the program runs, you will be prompted for a username and password. Use the username and password supplied by WRDS (it is the same as the one you use to log into the WRDS web interface).
The Basics of Using SAS/Connect
Once a connection is established, you can submit SAS code and interact with the WRDS Unix server. To submit code to the remote server, you place "rsumbit;" before the code to the sent and "endrsubmit;" at the end of the code to be sent. For example:
data test; a=2; run;
rsubmit; proc upload data=test out=test2; run;
data test3; set test2; b=1; run;
proc download data=test3 out=test4; run;
This program creates a dataset called "test" on the computer you are using. Next, "rsumbit" is used and the subsquent code is run on the remote server. In this case, the "test" dataset is uploaded from the local PC to the remote WRDS server and renamed "test2". Then a dataset called "test3" is created on the remote server and this file is downloaded back to the local PC and named "test4".
Keep in mind that, when working with large datasets, the upload and download times may be considerable. Also, if you assign libnames within the "rsubmit" portion and create datasets in that library, the files remain in your space on the WRDS Unix server until you delete them.
For more examples of using SAS/Connect, look at this SAS support note.