Resources

Selecting Time Series Using CROSSLIST=Option and WHERE=TICK

/*----------------------------------------------------------------

                   SAS Sample Library

        Name: famex10.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 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 training.db file (FAME database).
        To assign a fileref to the external file to be processed,
        use the following form of the libname statement:

libname lib10 sasefame "%sysget(FAME_DATA)"
        convert=(frequency=business technique=constant)
        range='07jul1997'd - '25jul1997'd
        inset=( inseta where=tick )
        crosslist=
            ( {adjust, close, high, low, open, volume,
               uclose, uhigh, ulow,uopen,uvolume} );
----------------------------------------------------------------*/
data inseta;
   length tick $5;
   /* need $5 so SPALN is not truncated */

   tick='AOL';   output;
   tick='C';     output;
   tick='CPQ';   output;
   tick='CVX';   output;
   tick='F';     output;
   tick='GM';    output;
   tick='HWP';   output;
   tick='IBM';   output;
   tick='SPALN'; output;
   tick='SUNW';  output;
   tick='XOM';   output;
run;

libname lib10 sasefame "%sysget(FAME_DATA)"
        convert=(frequency=business technique=constant)
        range='07jul1997'd - '25jul1997'd
        inset=( inseta where=tick )
        crosslist=
            ( {adjust, close, high, low, open, volume,
               uclose, uhigh, ulow,uopen,uvolume} );

data trout;
   /* eleven companies with unique TICKs specified in INSETA */
   set lib10.training;
   keep IBM: ;
run;

title1 'TRAINING DB, Pricing Timeseries for Eleven Tickers in CROSSLIST=';
title2 'Using INSET with WHERE=TICK.';
proc print data=trout;
run;

proc contents data=trout;
run;