Example 38.1 Specifying PERMNOs and RANGE on the LIBNAME Statement
The following statements show how to set up a LIBNAME statement for extracting data for certain selected PERMNOs during a specific time period. The result is shown in Output 38.1.1.
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;
Output 38.1.1
ASK Monthly Time Series Data with RANGE
81871 |
19950731 |
18.25000 |
81871 |
19950831 |
19.25000 |
81871 |
19950929 |
26.00000 |
81871 |
19951031 |
26.00000 |
81871 |
19951130 |
25.50000 |
81871 |
19951229 |
24.25000 |
81871 |
19960131 |
22.00000 |
81871 |
19960229 |
32.50000 |
81871 |
19960329 |
30.25000 |
81871 |
19960430 |
33.75000 |
81871 |
19960531 |
27.50000 |
81871 |
19960628 |
30.50000 |
82200 |
19950831 |
49.50000 |
82200 |
19950929 |
62.75000 |
82200 |
19951031 |
88.00000 |
82200 |
19951130 |
138.50000 |
82200 |
19951229 |
139.25000 |
82200 |
19960131 |
164.25000 |
82200 |
19960229 |
51.00000 |
82200 |
19960329 |
41.62500 |
82200 |
19960430 |
61.25000 |
82200 |
19960531 |
68.25000 |
82200 |
19960628 |
62.50000 |
82224 |
19950929 |
46.50000 |
82224 |
19951031 |
48.50000 |
82224 |
19951130 |
47.75000 |
82224 |
19951229 |
49.75000 |
82224 |
19960131 |
49.00000 |
82224 |
19960229 |
47.00000 |
82224 |
19960329 |
53.00000 |
82224 |
19960430 |
55.50000 |
82224 |
19960531 |
54.25000 |
82224 |
19960628 |
51.00000 |
83435 |
19960430 |
30.25000 |
83435 |
19960531 |
28.00000 |
83435 |
19960628 |
21.00000 |
83696 |
19960628 |
19.12500 |
Copyright © SAS Institute Inc. All rights reserved.