Selecting Time Series Using CROSSLIST=Option and WHERE=TICK
/*----------------------------------------------------------------
SAS Sample Library
Name: famex18.sas
Description: Example program from SAS/ETS User's Guide,
The SASEFAME Interface Engine
Title: Selecting Time Series Using CROSSLIST=Option and WHERE=TICK
Product: SAS/ETS Software
Keys: FAME data extraction, CROSSLIST= INSET= WHERE=TICK
Procs: SASEFAME
Notes: Read this before you run this sample.
The remote training database resides in the FAME util folder on the
remote MCADBS node named in ON\_HOST= option. You
may need to examine the TICKER namelist on that host to specify INSETZ
to contain the matching tickers.
Specify your own hostname, service, name,
username and password to run the sample code.
Check your MCADBS config file to know the dbid
(usually TR for training.db), which you specify on the set statement
in the DATA STEP.
----------------------------------------------------------------*/
option validvarname=any;
data insetz;
length tick $6;
/* need $6 so DJ30IN is not truncated */
tick='C'; output;
tick='CVX'; output;
tick='DJ30IN'; output;
tick='F'; output;
tick='HPQ'; output;
tick='IBM'; output;
tick='INTC'; output;
tick='KO'; output;
tick='ORCL'; output;
tick='PEP'; output;
tick='SPX'; output;
tick='XOM'; output;
tick='YUM'; output;
run;
libname lib10 sasefame "C:\PROGRA~1\FAME\util"
debug=on
connect=yes to_service="2961" on_host="txa006" as_name="C"
user="famekff" pass="XXXXXXXXX"
convert=(frequency=business technique=constant)
range='07jul1997'd - '25jul1997'd
inset=( insetz where=tick )
crosslist=
( {adjust, close, high, low, open, volume,
uclose, uhigh, ulow, uopen, uvolume} );
data trout;
/* thirteen companies with unique TICKs specified in INSETZ */
/* Use tr since this is the MCADBS dbid for the training.db */
set lib10.tr;
keep DATE IBM: ; /* only keep IBM for brevity of output results */
run;
title1 'TRAINING DB, Pricing Timeseries for IBM';
title2 'Using INSET with WHERE=TICK.';
proc print data=trout;
run;
proc contents data=trout;
run;