Specifying the URL= Option to Create VINTAGE_DATES Data Set.

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

                   SAS SAMPLE LIBRARY

       Name: fredex07.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEFRED Interface Engine
      Title: Specifying the URL= Option to Create VINTAGE_DATES Data Set.

    Product: SAS/ETS Software
       Keys: FRED data extraction
      Procs: SASEFRED
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder.
             Define a system environment variable,
             FRED, to the path of your  writeable folder containing
             the XFREDtpu.xml as your destination folder for FRED data.
             To assign a fileref to the external file to be processed,
             use the following form of the libname statement:

           libname fred sasefred "%sysget(FRED)"
              URL="https://api.stlouisfed.org/fred/series/vintagedates?series_id=N5005C1A027NBEA"
              APIKEY='<your FRED apikey>'
              IDLIST= 'N5005C1A027NBEA'
              ;
 ----------------------------------------------------------------*/

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

title 'Specifying the URL= Option to Create the VINTAGE_DATES Data Set';
libname _all_ clear;

libname mylib "/sasusr/playpens/saskff/fred/doc/";

libname fred1 sasefred "%sysget(FRED)"
   URL="https://api.stlouisfed.org/fred/series/vintagedates?series_id=N5005C1A027NBEA"
   APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   IDLIST= 'N5005C1A027NBEA'
   ;

data mylib.vindat1;
   set fred1.XFREDtpu;
run;

proc print
   data=mylib.vindat1;
run;

proc contents
   data=mylib.vindat1;
run;