run; %setup(ets); options nodate ls=78 ps=60; options validvarname=any mprint symbolgen; %let FAME=%sysget(FAME); %put(&FAME); %let FAMETEMP=%sysget(FAME_TEMP); %put(&FAMETEMP); %macro famemacr(mach,libn,convert,wildcard,temp); /*---------------------------------------------------------------*/ /*-- DEVHOST, hp700 development --*/ /*---------------------------------------------------------------*/ %if %quote(&mach) = DEVHOST %then %do; %if &temp eq %then %do; libname lib&libn sasefame '/sas/m701/ets/testdat' &convert &wildcard %end; %else %do; libname temp '/usr/local/scratch/sasalc' %end; %end; /*---------------------------------------------------------------*/ /*-- WINDOWS --*/ /*---------------------------------------------------------------*/ %else %if %quote(&mach) = DNTHOST or %quote(&mach) = WIN or %quote(&mach) = WIN_NT %then %do; %if &temp eq %then %do; /* libname lib&libn sasefame "&FAME\util" * &convert &wildcard */ libname lib4 sasefame "&FAME\util" fameout=case convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd /* crosslist=(nl(ticker), {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen, uvolume}) */ wildcard="?" ; libname lib&libn sasefame "&FAME\util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd inset=( insetall where=tick ) crosslist=( {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen, uvolume}) %end; %else %do; libname temp 'c:\temp' %end; %end; /*---------------------------------------------------------------*/ /*-- ALL UNIXen --*/ /*---------------------------------------------------------------*/ %else %if %quote(&mach) = %quote(SUN 64) or %quote(&mach) = %quote(AIX 64) %then %do; %if &temp eq %then %do; libname lib4 sasefame "&FAME/util" fameout=case convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd /* crosslist=(nl(ticker), {adjust, close, high, low, open, volume, uclose, uhigh, ulow,uopen,uvolume}) */ wildcard="?" ; ; libname lib&libn sasefame "/usr/local/famelib90/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd inset=( inseta where=tick ) crosslist=( {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen, uvolume}) %end; %else %do; libname temp "/usr/local/famelib90/util" %end; %end; %else %if %quote(&mach) = %quote(LINUX) or %quote(&mach) = %quote(HP 64) %then %do; %if &temp eq %then %do; libname lib4 sasefame "&FAME/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd crosslist=(nl(ticker), {adjust, close, high, low, open, volume, uclose, uhigh, ulow,uopen,uvolume}) ; libname lib&libn sasefame "/usr/local/famelib90/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd inset=( insetc where=tick ) crosslist=( {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen, uvolume}) %end; %else %do; libname temp "/usr/local/famelib90/util" %end; %end; /*---------------------------------------------------------------*/ /*-- LAX UNIX 9.2 rev 2 --*/ /*---------------------------------------------------------------*/ %else %if %quote(&mach) = %quote(LIN X64) %then %do; %if &temp eq %then %do; libname lib4 sasefame "&FAME/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd crosslist=(nl(ticker), {adjust, close, high, low, open, volume, uclose, uhigh, ulow,uopen,uvolume}) ; libname lib&libn sasefame "/usr/local/famelib92/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd inset=( insetd where=tick ) crosslist=( {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen, uvolume}) %end; %else %do; libname temp "/usr/local/famelib92/util" %end; %end; %else %if %quote(&mach) = %quote(NEXT) or %quote(&mach) = %quote(DG UX) or %quote(&mach) = %quote(88K) or %quote(&mach) = %quote(Domain) or %quote(&mach) = %quote(SUN 4) or %substr(%quote(&mach),1,3) = %quote(SUN) or %quote(&mach) = %quote(ULTRIX) or %quote(&mach) = %quote(UMIPS) or %quote(&mach) = %quote(SINIX) or %quote(&mach) = %quote(IRIX) or %substr(%quote(&mach),1,2) = %quote(HP) or %quote(&mach) = %quote(CONVEX) or %quote(&mach) = %quote(RS6000) or %quote(&mach) = %quote(SR10) or %quote(&mach) = %quote(MIPS ABI) or %substr(%quote(&mach),1,3) = %quote(386) or %quote(&mach) = %quote(ALXOSF) or %quote(&mach) = %quote(AIX_370) or %quote(&mach) = %quote(AIX_ESA) %then %do; %if &temp eq %then %do; libname lib4 sasefame "&FAME/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd crosslist=(nl(tickers), {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen}) ; libname lib&libn sasefame "/usr/local/famelib80/util" convert=(frequency=business technique=constant) range='02jan1995'd - '25jul1997'd inset=( insetb where=tick ) crosslist=( {adjust, close, high, low, open, volume, uclose, uhigh, ulow, uopen}) %end; %else %do; libname temp "/usr/local/famelib80/util" %end; %end; %mend; /*------------------------------------------------------------------ * * SAS TEST LIBRARY TRAILER * * SYSTEMS: ALL * PRODUCT: ets * SUPPORT: saskff * CHANGES: 27MAY2005 *----------------------------------------------------------------*/ /* Call macro to assign libname statements */ data insetall; length tick $32; tick='AOL'; output; tick='C'; output; tick='CPQ'; output; tick='CVX'; output; tick='DJ__30'; output; tick='F'; output; tick='GM'; output; tick='HWP'; output; tick='IBM'; output; tick='SPALN'; output; tick='SUNW'; output; tick='XOM'; output; run; data inseta; length tick $32; tick='AOL'; output; tick='C'; output; tick='CPQ'; output; tick='CVX'; output; /* tick='DJ'; output; */ tick='F'; output; tick='GM'; output; tick='HWP'; output; tick='IBM'; output; tick='SPALN'; output; tick='SUNW'; output; tick='XOM'; output; run; data insetb; /* Use this for d6664 training data base */ length tick $32; tick='C'; output; tick='CCI'; output; tick='DEC'; output; tick='F'; output; tick='GM'; output; tick='HWP'; output; tick='IBM'; output; tick='MOB'; output; tick='SPAL'; output; tick='SUNW'; output; tick='TX'; output; tick='XON'; output; run; proc print data=insetb; run; data insetc; /* Use this for LINUX training data base */ length tick $32; tick='AOL'; output; tick='C'; output; tick='CVX'; output; tick='F'; output; tick='GM'; output; tick='HPQ'; output; tick='IBM'; output; tick='INDUA'; output; tick='INTC'; output; tick='SPX'; output; tick='SUNW'; output; tick='XOM'; output; run; proc print data=insetc; run; data insetd; /* Use this for LIN 86 training data base */ length tick $32; tick='CVX'; output; tick='F'; output; tick='GM'; output; tick='HPQ'; output; tick='IBM'; output; tick='INTC'; output; tick='KO'; output; tick='PEP'; output; tick='SPALNS'; output; tick='SUNW'; output; tick='XOM'; output; run; proc print data=insetd; run; %famemacr(&SYSSCP,5); /* * libname lib4 sasefame "C:\PROGRA~1\FAME\util" * convert=(frequency=business technique=constant) * range='02jan1995'd - '25jul1997'd * crosslist=(nl(ticker), *{adjust, close, high, low, open, volume, uclose, uhigh,ulow,uopen,uvolume}) */ data crout; set lib4.training; run; title2 'CONTENTS of OUT=crout from the FAME Crosslist function'; title3 'Using TICKER namelist.'; proc contents data=crout; run; title2 'TRAINING DB, Pricing Timeseries for Tickers in CROSSLIST='; title3 'OUT=CROUT from the PRINT Procedure'; proc print data=crout; run;