Specifying TICKER Keys Using the INSET= Option
/*----------------------------------------------------------------
SAS Sample Library
Name: crpex04c.sas
Description: Example program from SAS/ETS User's Guide,
The SASECRSP Interface Engine
Title: Specifying TICKER Keys Using the INSET= Option
Product: SAS/ETS Software
Keys: Stock data access, CRSPAccess, INSET= Option, TICKER
Procs: SASECRSP
Notes: Read this before you run this sample.
The CRSP Stock database resides in the CRSP_MSTK folder. You
must install your CRSP Monthly Stock data
and define your Windows system environment
variable, CRSP_MSTK, to point to the physical path
of your installed CRSP Stock database. Use the following
form of the libname statement:
libname sec3 sasecrsp "%sysget(CRSP_MSTK)"
setid=20
inset='securities,TICKER,TICKER'
range='19970820-19970920';
----------------------------------------------------------------*/
data securities;
ticker='BAC'; output; /* Bank of America */
ticker='DUK'; output; /* Duke Energy */
ticker='GSK'; output; /* GlaxoSmithKline */
run;
libname sec3 sasecrsp "%sysget(CRSP_MSTK)"
setid=20
inset='securities,TICKER,TICKER'
range='19970820-19970920';
title2 'PERMNOs and General Header Info of Selected TICKERs';
proc print data=sec3.stkhead(keep=permno htick htsymbol) label;
run;
title3 'Average Price for Bank of America, Duke and GlaxoSmithKline';
proc print data=sec3.prc label;
run;