The SASEXCCM Interface Engine

Example 40.7 Retrieving Stock and Indices Monthly Time Series by INDNO

This example shows how to retrieve monthly time series by using INDNO key access in the IND database. For brevity, the WHERE= option in the DATA step selects a recent range of MCALDT.

title 'Retrieve Several Monthly Time Series by INDNO Access';
libname _all_ clear;

libname crsp sasexccm
   "\\tappan\crsp1\data201008_little\MIZ201006\"
   setid=420
   indno=1000040 indno=1000060 indno=1000080
   itemlist="MAIND;MARET;MIIND";

data mindts_all ( where=( mcaldt >= '30jun2009'd) );
   set crsp.mthind_ts;
run;

proc print data=mindts_all; run;

Output 40.7.1: Monthly Time Series by INDNO

Retrieve Several Monthly Time Series by INDNO Access

Obs KYINDNO MCALDT MAIND MARET MIIND
1 1000040 20090630 806.96 -0.015017 333.67
2 1000040 20090731 873.04 0.081896 334.25
3 1000040 20090831 902.23 0.033436 335.08
4 1000040 20090930 938.68 0.040394 335.72
5 1000040 20091030 912.56 -0.027819 336.24
6 1000040 20091130 964.47 0.056883 337.16
7 1000040 20091231 982.11 0.018287 337.88
8 1000040 20100129 949.37 -0.033339 338.31
9 1000040 20100226 978.72 0.030920 339.13
10 1000040 20100331 1037.53 0.060087 339.79
11 1000040 20100430 1054.85 0.016696 340.25
12 1000040 20100528 968.99 -0.081403 341.07
13 1000040 20100630 920.85 -0.049681 341.73
14 1000060 20090630 1258.17 0.034083 180.28
15 1000060 20090731 1356.35 0.078031 180.36
16 1000060 20090831 1378.50 0.016334 180.59
17 1000060 20090930 1454.80 0.055349 180.68
18 1000060 20091030 1401.98 -0.036304 180.75
19 1000060 20091130 1468.60 0.047513 181.08
20 1000060 20091231 1555.54 0.059201 181.19
21 1000060 20100129 1470.06 -0.054949 181.25
22 1000060 20100226 1530.69 0.041239 181.49
23 1000060 20100331 1641.63 0.072481 181.61
24 1000060 20100430 1686.83 0.027533 181.69
25 1000060 20100528 1544.38 -0.084447 181.93
26 1000060 20100630 1440.70 -0.067137 182.02
27 1000080 20090630 823.64 -0.004569 305.33
28 1000080 20090731 890.39 0.081042 305.78
29 1000080 20090831 916.85 0.029715 306.46
30 1000080 20090930 956.86 0.043638 306.94
31 1000080 20091030 928.44 -0.029699 307.34
32 1000080 20091130 979.35 0.054839 308.12
33 1000080 20091231 1006.14 0.027352 308.68
34 1000080 20100129 967.73 -0.038177 309.01
35 1000080 20100226 999.85 0.033197 309.68
36 1000080 20100331 1062.61 0.062762 310.20
37 1000080 20100430 1082.91 0.019104 310.55
38 1000080 20100528 994.02 -0.082082 311.22
39 1000080 20100630 940.73 -0.053606 311.73