Previous Page | Next Page

The SASEHAVR Interface Engine

Example 37.6 Limiting the Range of Time Series from a Haver Database

The following statements limit the range of data to the month of December:

libname lib1 sasehavr "%sysget(HAVER_DATA)" 
        freq=daily 
        start=20041201 
        end=20041231;

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=20041201 END=20041231 LIBNAME options.';         
  
proc print data=hwoutd;
run;

Note that Output 37.6.1 for daily conversion shows the frequency as the SAS time interval for WEEKDAY.

Output 37.6.1 Defining a Range inside the Data Range for Daily Time Series
Haver Analytics Database, Frequency=daily, infile=haverd.dat
Define a range inside the data range for OUT= dataset
Using the START=20041201 END=20041231 LIBNAME options.

Obs DATE FCM10 FCM1M FFED FFP1D FXAUS TCC
1 01DEC2004 4.38 2.06 2.04 2.01 0.7754 7564
2 02DEC2004 4.40 2.06 2.00 1.98 0.7769 8502
3 03DEC2004 4.27 2.06 1.98 1.96 0.7778 7405
4 06DEC2004 4.24 2.09 2.04 1.98 0.7748 7019
5 07DEC2004 4.23 2.08 1.99 1.99 0.7754 15520
6 08DEC2004 4.14 2.08 2.01 1.98 0.7545 12329
7 09DEC2004 4.19 2.07 2.05 2.03 0.7532 5441
8 10DEC2004 4.16 2.07 2.09 2.07 0.7495 6368
9 13DEC2004 4.16 2.04 2.18 2.13 0.7592 11395
10 14DEC2004 4.14 2.01 2.24 2.22 0.7566 13695
11 15DEC2004 4.09 1.98 2.31 2.27 0.7652 39765
12 16DEC2004 4.19 1.93 2.26 2.24 0.7563 33640
13 17DEC2004 4.21 1.95 2.23 2.20 0.7607 32764
14 20DEC2004 4.21 1.97 2.26 2.21 0.7644 36216
15 21DEC2004 4.18 1.92 2.24 2.21 0.7660 35056
16 22DEC2004 4.21 1.84 2.25 2.22 0.7656 34599
17 23DEC2004 4.23 1.83 2.34 2.08 0.7654 24467
18 24DEC2004 . . 2.27 . 0.7689 26898
19 27DEC2004 4.30 1.90 2.24 2.26 0.7777 31874
20 28DEC2004 4.31 1.88 2.24 2.24 0.7787 30513
21 29DEC2004 4.33 1.76 2.23 2.23 0.7709 34754
22 30DEC2004 4.27 1.68 2.24 2.18 0.7785 20045
23 31DEC2004 4.24 1.89 1.97 2.18 0.7805 24690

Previous Page | Next Page | Top of Page