Resources

Read Tammer1's Superset containing Multiple Time Series

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

                   SAS SAMPLE LIBRARY

       Name: quanex07.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEQUAN Interface Engine
      Title: Read Tammer1's Superset containing Multiple Time Series
    Product: SAS/ETS Software
       Keys: Quandl data extraction
      Procs: SASEQUAN
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder.
             If you are using automap=READONLY, then you must copy the
             map of your incoming XML data to a writeable folder before
             using it. So, define a Windows system environment variable
             ,QUANDL, to the path of your  writeable folder containing
             the quanex07.map file and QUANEX07.xml.
             To assign a fileref to the external file to be processed,
             use the following form of the libname statement:

           libname quan sasequan "%sysget(QUANDL)"
              FORMAT=XML
              OUTXML=quanex07
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(QUANDL)quanex07.map"
              APIKEY='<your Quandl apikey>'
              IDLIST='<your list of Quandl codes>'
              START='<trim_start>'
              END='<trim-end>'
              COLLAPSE=annual
              ;
 ----------------------------------------------------------------*/


options validvarname=any;

title 'TAMMER1/6KY Superset with Multiple Time Series Using COLLAPSE= Option';
libname _all_ clear;
libname mylib "U:\quan950\doc\";

libname myTAM sasequan "%sysget(QUANDL)"
   apikey='XXXXXXXXXXXXXXXXXXXX'
   idlist='TAMMER1/6KY'
   format=XML
   outXml=superT
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(QUANDL)superT.map"
   start='1961-12-31'
   end='2014-03-27'
   collapse=annual
   ;

data mylib.superT;
   set myTAM.superT;
run;

proc contents data=mylib.superT; run;
proc print data=mylib.superT; run;