0

I use WRDS server via the WRDS Cloud using SAS. Trying the code below, I received the error (below the code). How can I fix it.

* Download Moody's annual accounting data;
proc sql;
  create table moody as
  select gvkey, datadate, mval
  from mdy.annlt;
quit;

ERROR: Libref MDY is not assigned. NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

This code does not work to solve the error:

  • Set up libraries for WRDS access;

libname moody wrds.mdy;

Sara Siep
  • 13
  • 3
  • What about `libname mdy wrds.mdy`? You are referring to libref `mdy` but assign a libname `moody`. – Therkel May 02 '23 at 11:07
  • it also gives error: libname mdy wrds.mdy; ERROR: Libref in LIBNAME statement must be followed either by quoted string or engine name or semicolon; "wrds.mdy" found. ERROR: Error in the LIBNAME statement. – Sara Siep May 02 '23 at 11:49
  • Check out the documentation of [`libname`](https://documentation.sas.com/doc/da/pgmsascdc/9.4_3.5/lestmtsglobal/n1nk65k2vsfmxfn1wu17fntzszbp.htm). You have to specify `wrds` as a path, e.g. something like this: `libname wdy "/wrds/";`. Possibly, but this is a pure guess, your path is `/wrds/wdy` .. – Therkel May 02 '23 at 11:58

0 Answers0