Created
January 1, 2015 21:53
-
-
Save joosti/5308e2605bcd057494c4 to your computer and use it in GitHub Desktop.
SAS CRSP DSENAMES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Retrieve historic cusip | |
work.myDset holds permno and datadate (end of fiscal year) | |
Appends historic cusip (at time datadate) | |
*/ | |
proc sql; | |
create table work.withCusip as | |
select a.*, b.ncusip | |
from work.myDset a, crsp.dsenames b | |
where | |
a.permno = b.PERMNO | |
and b.namedt <= a.datadate <= b.nameendt | |
and b.ncusip ne ""; | |
quit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment