 
 
 
 
 
   
Suppose I have data about stocks that only has historical CUSIPs as identifiers. Examples include holdings data, governance data, and mutual fund voting data. To convert these into PERMNOs, I could use the stocknames file, doing as suggested by Subsection 6.2. Alternatively, I could use the fact that CUSIPS are not reused in the data:
     proc sort data=crsp.stocknames(keep=permno cusip) out=permnocusip(rename=(cusip=ncusip)) nodupkey;
        where cusip is not missing;
        by permno cusip;
     run;
     proc sort data=crsp.stocknames(keep=permno ncusip) out=permnoncusip nodupkey;
        where ncusip is not missing;
        by permno ncusip;
     run;
     proc append base=permnoncusip data=permnocusip;
     run;
     proc sort data=permnoncusip nodupkey;
        by permno ncusip;
     run;
The last file is a permno-ncusip lookup table, which I can merge with my CUSIP data to obtain permnos.
Why did I include CUSIPs as well? One would expect that the NCUSIP history perfectly accounted for even the last CUSIP held - the header CUSIP. But it does not always.