| The SASECRSP Interface Engine |
The LIBNAME libref SASECRSP Statement
- LIBNAME libref SASECRSP 'physical name' options;
The following options can be used in the LIBNAME libref SASECRSP statement:
- SETID=crsp_setidnumber
-
specifies the CRSP set ID number where 10 is the daily data set ID and
20 is the monthly data set ID number. Two possible values for
crsp_setidnumber are 10 or 20.
SETID is a required option for the SASECRSP engine.
For more details about the CRSPAccess crsp_setidnumber,
refer to "Using Multiple Products" in the CRSPAccess Database Format Installation Guide.
For a more complete
discussion of SASECRSP set names, key fields, and date fields, see
Table 2.1.
As an example, to access monthly data, you would use the following statements:
LIBNAME myLib sasecrsp 'physical-name'
SETID=20;
- PERMNO=crsp_permnumber
-
By default, the SASECRSP engine reads all PERMNOs in the CRSPAccess
database that you name in your SASECRSP libref. You can limit the time
series read from the CRSP database by specifying the PERMNO= option
on your LIBNAME statement.
From a performance standpoint, the PERMNO= option does random access and reads only the data for the PERMNOs listed.
There is no limit to the number of
crsp_permnumber options that you can use.
As an example, to access monthly data for Microsoft Corporation and
for International Business Machine Corporation,
LIBNAME myLib sasecrsp 'physical-name'
SETID=20,
PERMNO=10107,
PERMNO=12490;
- RANGE='crsp_begdt-crsp_enddt'
-
To limit the time range of data read from the CRSPAccess
database, specify the RANGE= option in your SASECRSP libref,
where crsp_begdt is the beginning date in YYYYMMDD format and
crsp_enddt is the endding date of the range in YYYYMMDD format.
From a performance standpoint, the engine reads all the data for a
company and then restricts the data range before passing it back.
As an example, to access daily data for Microsoft Corporation and
for International Business Machine Corporation for the first quarter of 2000,
use the following statements:
LIBNAME myLib sasecrsp 'physical-name'
SETID=20,
PERMNO=10107,
PERMNO=12490,
RANGE='19990101-19990331';
- INSET='setname[,keyfieldname][,keyfieldtype][,date1field][,date2field]'
-
When you specify a SAS data set named setname as input for issues,
the SASECRSP engine assumes a default PERMNO field containing selected
CRSP PERMNOs is present in the data set. If optional parameters are
included, the first one is the key name, and the second is the key type.
The third optional parameter is the beginning date or event date, and the fourth
is the ending date in YYYYMMDD format.
Copyright © 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.