Reading Time Series by Defining Fame Expression Groups in INSET
/*----------------------------------------------------------------
SAS Sample Library
Name: famex16.sas
Description: Example program from SAS/ETS User's Guide,
The SASEFAME Interface Engine
Title: Reading Time Series by Defining Fame Expression Groups in INSET
Product: SAS/ETS Software
Keys: FAME data extraction, KEEP= express, and Inset Expression Groups
Procs: SASEFAME
Notes: Read this before you run this sample.
The database resides in the ets/sasmisc folder. You
must copy the database to a writeable folder before
using it. Then define your Windows system environment
variable, FAME_DATA, to the path of your
writeable folder containing
the trainten.db file (FAME database).
To assign a fileref to the external file to be processed,
use the following form of the libname statement:
libname libX sasefame "%sysget(FAME_DATA)"
wildcard="?"
convert=(frequency=business technique=constant)
range='23jul1997'd - '25jul1997'd
inset=( inseta KEEP=express);
----------------------------------------------------------------*/
title1 '***TRAINTEN DB, Pricing Timeseries for Expressions in INSET=';
options validvarname=any;
%let FAME=%sysget(FAME);
%put(&FAME);
%let FAMETEMP=%sysget(FAME_TEMP);
%put(&FAMETEMP);
data inseta; /* Use this for d8690 training database */
length express $52;
express='cvx.close;'; output;
express='{ibm.high,ibm.low,ibm.close};'; output;
express='mave(ibm.close,30);'; output;
express='crosslist({gm,f,c},{volume});'; output;
express='cvx.close+ibm.close;'; output;
express='ibm.close;'; output;
express='sum(pep.volume);'; output;
express='mave(pep.close,20);'; output;
run;
title1 'TRAINING DB, Pricing Timeseries for Expressions in INSET=';
proc print
data=inseta;
run;
libname libX sasefame "%sysget(FAME_DATA)"
wildcard="?"
convert=(frequency=business technique=constant)
range='23jul1997'd - '25jul1997'd
inset=( inseta KEEP=express)
;
data trout;
set libX.trainten;
run;
title1 'TRAINING DB, Pricing Timeseries for Expressions in INSET=';
proc print data=trout;
run;
proc contents data=trout;
run;