Hi,
I used the following program to pull down the data from Compustat. However, Compustat is assigned, still data is not pulled down from WRDS. Do you have suggestions?
options ls = 104;
options ls=72 ps=max nocenter nonumber nodate fullstimer ;
%let wrds = wrds.wharton.upenn.edu 4016;
options comamid=TCP remote=WRDS;
signon username=_prompt_;
rsubmit;
options source ls=72 ps=max;
option obs=max;
libname compx '/wrds/comp/sasdata/nam' ;
libname crsp '/wrds/crsp/sasdata/a_stock' ;
run;
* Date range-- applied to FYEAR ( Fiscal Year);
%let fyear1= 2012;
%let fyear2= 2014;
* Selected data items (GVKEY, DATADATE, FYEAR and FYR are automatically included);
%let vars= cusip ;
%let out_ds= work.compx2;
%let n_month_after=3;
data &out_ds;
set compx.funda(keep= gvkey datadate fyear fyr &vars indfmt datafmt popsrc consol);
where fyear between &fyear1 and &fyear2;
if indfmt='INDL' and datafmt='STD' and popsrc='D' and consol='C';
drop indfmt datafmt popsrc consol; * Only used for the screening;
run;
proc sort; by gvkey fyear; run;
277 options ls = 104;
278 options ls=72 ps=max nocenter nonumber nodate fullstimer ;
279 %let wrds = wrds.wharton.upenn.edu 4016;
280 options comamid=TCP remote=WRDS;
281 signon username=_prompt_;
NOTE: Remote signon to WRDS commencing (SAS Release 9.03.01M2P081512).
NOTE: SASPROPRIETARY encryption is being used to protect network
traffic.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
instead.
NOTE: All profile changes will be lost at the end of the session.
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
Licensed to UNIVERSITY OF PENNSYLVANIA - SFA T&R, Site 70055201.
NOTE: This session is executing on the Linux 2.6.32-642.3.1.el6.x86_64
(LIN X64) platform.
Engine: V9
Physical Name: /wrds/comscore/sasdata
NOTE: Libref CONTRIB was successfully assigned as follows:
Engine: V9
Physical Name: /wrds/contributors/sasdata/rq
NOTE: Libref CRSPA was successfully assigned as follows:
3 libname compx '/wrds/comp/sasdata/nam' ;
NOTE: Libref COMPX refers to the same physical library as COMP.
NOTE: Libref COMPX was successfully assigned as follows:
Engine: V9
Physical Name: /wrds/comp/sasdata/nam
4 libname crsp '/wrds/crsp/sasdata/a_stock' ;
NOTE: Libref CRSP refers to the same physical library as CRSPA.
NOTE: Libref CRSP was successfully assigned as follows:
Engine: V9
Physical Name: /wrds/crsp/sasdata/a_stock
5 run;
NOTE: Remote submit to WRDS complete.
283
284 * Date range-- applied to FYEAR ( Fiscal Year);
285 %let fyear1= 2012;
286 %let fyear2= 2014;
287
288 * Selected data items (GVKEY, DATADATE, FYEAR and FYR are
288! automatically included);
289 %let vars= cusip ;
290
291 %let out_ds= work.compx2;
292 %let n_month_after=3;
293
294 data &out_ds;
295 set compx.funda(keep= gvkey datadate fyear fyr &vars indfmt
295! datafmt popsrc consol);
ERROR: Libname COMPX is not assigned.
296 where fyear between &fyear1 and &fyear2;
297 if indfmt='INDL' and datafmt='STD' and popsrc='D' and consol='C'
297! ;
298 drop indfmt datafmt popsrc consol; * Only used for the
298! screening;
299 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.COMPX2 may be incomplete. When this step
was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.COMPX2 was not replaced because this step was
stopped.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
user cpu time 0.01 seconds
system cpu time 0.01 seconds
memory 214.56k
OS Memory 11964.00k
Timestamp 09/27/2016 01:40:46 PM
300 proc sort; by gvkey fyear; run;
ERROR: Variable GVKEY not found.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 42.53k
OS Memory 11964.00k
Timestamp 09/27/2016 01:40:46 PM