Previous Page | Next Page

The SASEFAME Interface Engine

Example 36.2 Reading Time Series from the Fame Database

This example uses the Fame wildcard option to limit the number of series converted. The following statements show how to read only series that start with WSPCA.

options validvarname=any;

%let FAME=%sysget(FAME);
%put(&FAME);
%let FAMETEMP=%sysget(FAME_TEMP);
%put(&FAMETEMP);

libname lib1 sasefame "%sysget(FAME_DATA)"
        wildcard="wspca?"
        convert=(technique=constant freq=twicemonthly );

libname lib2 "%sysget(FAME_TEMP)";

data lib2.twild(label='Annual Series from the FAMEECON.db');
   set lib1.subecon;
   where date between '01jan93'd and '31dec93'd;
   /* keep only  */
   keep date wspca;
run;

proc contents data=lib2.twild;
run;

proc print data=lib2.twild;
run;

Output 36.2.1 and Output 36.2.2 show the results of using WILDCARD="WSPCA?".

Output 36.2.1 Contents of OUT=LIB2.TWILD of the SUBECON Fame Data
The CONTENTS Procedure

Alphabetic List of Variables and Attributes
# Variable Type Len Format Informat Label
1 DATE Num 8 DATE9. 9. Date of Observation
2 WSPCA Num 8     STANDARD & POOR'S WEEKLY BOND YIELD: COMPOSITE, A

The WILDCARD="WSPCA?" option limits reading to only those series whose names begin with WSPCA. The KEEP statement further restricts the SAS data set to include only the series named WSPCA and the DATE variable. The time interval used for the conversion is TWICEMONTHLY.

Output 36.2.2 Listing of OUT=LIB2.TWILD of the SUBECON Fame Data
Obs DATE WSPCA
1 01JAN1993 8.59400
2 16JAN1993 8.50562
3 01FEB1993 8.47000
4 16FEB1993 8.31000
5 01MAR1993 8.27000
6 16MAR1993 8.29250
7 01APR1993 8.32400
8 16APR1993 8.56333
9 01MAY1993 8.37867
10 16MAY1993 8.26312
11 01JUN1993 8.21333
12 16JUN1993 8.14400
13 01JUL1993 8.09067
14 16JUL1993 8.09937
15 01AUG1993 7.98533
16 16AUG1993 7.91600

Previous Page | Next Page | Top of Page