The SASECRSP Interface Engine |
To set up the libref to access all keys, no key options such as PERMNO=, TICKER=, or GVKEY= are specified on the LIBNAME statement, and no INSET= option is used. Use of any of these options causes the engine to limit access to only specified keys or specified insets. When no such options are specified, the engine correctly defaults to selecting all keys in the database. Other LIBNAME options such as the RANGE= option can still be used normally to limit the time span of the data, in other words, to define the date range of observations.
In this example, no key-specifying options are used. This forces the engine to default to all PERMNOs in the monthly STK database. The range given on the LIBNAME behaves normally, and data is limited to the first two months of 1995.
title2 'Define a range inside the data range '; title3 'My range is ( 19950101-19950228 )'; libname _all_ clear; libname testit2 sasecrsp "%sysget(CRSP_MSTK)" setid=20 range='19950101-19950228'; data a; set testit2.ask(obs=30); run; proc print data=a; run;
The result is shown in Output 35.2.1.