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
DATE |
Num |
8 |
DATE9. |
9. |
Date of Observation |
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
01JAN1993 |
8.59400 |
16JAN1993 |
8.50562 |
01FEB1993 |
8.47000 |
16FEB1993 |
8.31000 |
01MAR1993 |
8.27000 |
16MAR1993 |
8.29250 |
01APR1993 |
8.32400 |
16APR1993 |
8.56333 |
01MAY1993 |
8.37867 |
16MAY1993 |
8.26312 |
01JUN1993 |
8.21333 |
16JUN1993 |
8.14400 |
01JUL1993 |
8.09067 |
16JUL1993 |
8.09937 |
01AUG1993 |
7.98533 |
16AUG1993 |
7.91600 |
Copyright © SAS Institute, Inc. All Rights Reserved.