Secret Macros to Use in WRDS Cloud

# Secret Macros to Use in WRDS Cloud

##### Jan 27, 2019
WRDS/SAS Tutorial

When a SAS program is submitted to WRDS Cloud for remote execution, a small script named autoexec.sas runs before everything. The content of this small script is as below:

 1 2 3 4 5  * The library name definitions below are used by SAS; * Assign default libref for WRDS (Wharton Research Data Services); %include '/wrds/lib/utility/wrdslib.sas' ; options sasautos=('/wrds/wrdsmacros/', SASAUTOS) MAUTOSOURCE; 

What it does is basically making the libnames available, so that when we want to, for example, access the Compustat funda dataset, we just need to write:

 1 2 3 4  data funda; set comp.funda; /* ... */ run; 

Because the library comp. is already assigned by the autoexec.sas.

It turns out that autoexec.sas also prepares a collection of SAS macros that can be directly used in the submitted program. As it shows, these macros are stored at /wrds/wrdsmacros/.

Some of these macros are described at the WRDS support page. Some are not. But they all are extremely handy. Redevelopment based on these macros will greatly speed up research and analysis.