| The SASECRSP Interface Engine |
Insets enable you to define options specific to each individual key. This example uses an inset to select four PERMNOs and specifies a different date restriction for each PERMNO.
title2 'INSET=testin2 uses date ranges along with PERMNOs:';
title3 '10107, 12490, 14322, 25788';
title4 'Begin dates and end dates for each permno are used in the INSET';
data testin2;
permno = 10107; date1 = 19980731; date2 = 19981231; output;
permno = 12490; date1 = 19970101; date2 = 19971231; output;
permno = 14322; date1 = 19950731; date2 = 19960131; output;
permno = 25778; date1 = 19950101; date2 = 19950331; output;
run;
libname _all_ clear;
libname mstk2 sasecrsp "%sysget(CRSP_MSTK)"
setid=20
inset='testin2,PERMNO,PERMNO,DATE1,DATE2';
data b;
set mstk2.prc;
run;
proc print data=b;
run;
Output 35.5.1 shows CRSP Stock price time series data selected by PERMNO in the INSET= option, where each PERMNO has its own time span specified in the INSET= option.