Previous Page | Next Page

The SASEHAVR Interface Engine

Example 37.9 Using the SOURCE Option to Subset Time Series from a Haver Database

To select specific variables that belong to a certain source, you can use the SOURCE= or DROPSOURCE= option, similar to the way you use the KEEP= or DROP= option.

libname lib1 sasehavr "%sysget(HAVER_DATA)" 
        freq=daily 
        start=20041101 
        end=20041223 
        source="FRB";

data hwoutd;
   set lib1.haverd;
run;

title1 'Haver Analytics Database, Frequency=daily, infile=haverd.dat';
title2 '   Define a range inside the data range for OUT= dataset';          
title3 '   Using the START=20041101 END=20041223 LIBNAME options.';          
title4 '   Subset further: Using source="FRB" LIBNAME option';              
proc print data=hwoutd;
run;

Output 37.9.1 shows two series that are selected by using SOURCE="FRB" in the LIBNAME statement.

Output 37.9.1 Using the SOURCE Option and Defining a Range Using START=20041101 END=20041223
Haver Analytics Database, Frequency=daily, infile=haverd.dat
Define a range inside the data range for OUT= dataset
Using the START=20041101 END=20041223 LIBNAME options.
Subset further: Using source="FRB" LIBNAME option

Obs DATE FCM10 FFED FFP1D FXAUS
1 01NOV2004 4.11 1.83 1.80 0.7460
2 02NOV2004 4.10 1.74 1.74 0.7447
3 03NOV2004 4.09 1.73 1.73 0.7539
4 04NOV2004 4.10 1.77 1.75 0.7585
5 05NOV2004 4.21 1.76 1.75 0.7620
6 08NOV2004 4.22 1.80 1.84 0.7578
7 09NOV2004 4.22 1.79 1.81 0.7618
8 10NOV2004 4.25 1.92 1.85 0.7592
9 11NOV2004 . 1.92 . .
10 12NOV2004 4.20 2.02 1.96 0.7685
11 15NOV2004 4.20 2.06 2.03 0.7719
12 16NOV2004 4.21 1.98 1.95 0.7728
13 17NOV2004 4.14 1.99 1.93 0.7833
14 18NOV2004 4.12 1.99 1.94 0.7786
15 19NOV2004 4.20 1.99 1.93 0.7852
16 22NOV2004 4.18 2.01 1.96 0.7839
17 23NOV2004 4.19 2.00 1.95 0.7860
18 24NOV2004 4.20 2.02 1.89 0.7863
19 25NOV2004 . 2.02 . .
20 26NOV2004 4.24 2.01 1.97 0.7903
21 29NOV2004 4.34 2.03 2.00 0.7852
22 30NOV2004 4.36 2.02 2.04 0.7723
23 01DEC2004 4.38 2.04 2.01 0.7754
24 02DEC2004 4.40 2.00 1.98 0.7769
25 03DEC2004 4.27 1.98 1.96 0.7778
26 06DEC2004 4.24 2.04 1.98 0.7748
27 07DEC2004 4.23 1.99 1.99 0.7754
28 08DEC2004 4.14 2.01 1.98 0.7545
29 09DEC2004 4.19 2.05 2.03 0.7532
30 10DEC2004 4.16 2.09 2.07 0.7495
31 13DEC2004 4.16 2.18 2.13 0.7592
32 14DEC2004 4.14 2.24 2.22 0.7566
33 15DEC2004 4.09 2.31 2.27 0.7652
34 16DEC2004 4.19 2.26 2.24 0.7563
35 17DEC2004 4.21 2.23 2.20 0.7607
36 20DEC2004 4.21 2.26 2.21 0.7644
37 21DEC2004 4.18 2.24 2.21 0.7660
38 22DEC2004 4.21 2.25 2.22 0.7656
39 23DEC2004 4.23 2.34 2.08 0.7654

Previous Page | Next Page | Top of Page