The following statements demonstrate how to use the URL= option to obtain the RELEASE and RELEASES data sets for a specific source and how to create a permanent data set named REL8 in the MyLib SAS library:
title 'Specifying the URL= Option to Create the REL8 Data Set'; libname _all_ clear; libname mylib "U:\fred940\doc\"; libname fred8 sasefred "U:\fred940\test\" debug=on URL="http://api.stlouisfed.org/fred/source/releases?source_id=11" APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ; data mylib.rel8; set fred8.XFREDtpu; run;
proc print data=mylib.rel8; run; proc contents data=mylib.rel8; run;
Output 48.11.1: Specifying the URL= Option to Create the REL8 Data Set
Specifying the URL= Option to Create the REL8 Data Set |
Obs | releases_ORDINAL | release_ORDINAL | release_id | release_realtime_start | release_realtime_end | release_name | release_press_release | release_link |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 72 | 2015-03-19 | 2015-03-19 | Daily Treasury Inflation-Indexed Securities | false | |
2 | 1 | 2 | 102 | 2015-03-19 | 2015-03-19 | Wall Street Journal | true | http://online.wsj.com/public/us |