Specifying PERMNOs and RANGE on the LIBNAME Statement
/*----------------------------------------------------------------
SAS Sample Library
Name: crpex01.sas
Description: Example program from SAS/ETS User's Guide,
The SASECRSP Interface Engine
Title: Specifying PERMNOs and RANGE on the LIBNAME Statement
Product: SAS/ETS Software
Keys: Stock data Access, CRSPAccess
Procs: SASECRSP
Notes: Read this before you run this sample.
The CRSP 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 database. Use the following
form of the libname statement:
libname testit1 sasecrsp "%sysget(CRSP_MSTK)"
setid=20
permno=81871 /* Desired PERMNOs are selected */
permno=82200 /* via the libname PERMNO= option */
permno=82224
permno=83435
permno=83696
permno=83776
permno=84788
range='19950101-19960630';
----------------------------------------------------------------*/
title2 'Define a range inside the data range';
title3 'My range is ( 19950101-19960630 )';
libname _all_ clear;
libname testit1 sasecrsp "%sysget(CRSP_MSTK)"
setid=20
permno=81871 /* Desired PERMNOs are selected */
permno=82200 /* via the libname PERMNO= option */
permno=82224
permno=83435
permno=83696
permno=83776
permno=84788
range='19950101-19960630';
proc print data=testit1.ask;
run;