Historical Prices for Oil India Limited

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

                   SAS SAMPLE LIBRARY

       Name: quanex01.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEQUAN Interface Engine
      Title: Historical Prices for Oil India Limited
    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 system environment variable
             ,QUANDL, to the path of your  writeable folder containing
             the QUANEX01.MAP file and QUANEX01.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=quanex01
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(QUANDL)quanex01.map"
              APIKEY='<your Quandl apikey>'
              IDLIST='<your list of Quandl codes>'
              START='<trim_start>'
              END='<trim-end>'
              FREQ='daily'
              COLLAPSE='daily'
              ;
 ----------------------------------------------------------------*/

options validvarname=any
   sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";

title 'Historical Prices for Oil India Limited';
libname _all_ clear;
libname mylib "/sasusr/playpens/saskff/quan/doc/";

/* export QUANDL=/sasusr/playpens/saskff/quan/test/ */

libname myQoil sasequan "/sasusr/playpens/saskff/quan/test/"
   apikey='XXXXXXXXXXXXXXXXXXXX'
   idlist='NSE/OIL'
   format=XML
   outXml=oil
   automap=replace
   mapref=MyMap
   xmlmap="/sasusr/playpens/saskff/quan/test/oil.map"
   start='2013-09-01'
   end='2013-11-05'
   freq='daily'
   collapse='daily'
   ;

data mylib.oilall;
   set myQoil.oil;
run;

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