The following statements demonstrate how to use the URL= option to obtain the SERIES and SERIESS data sets for a specified release and how to create a permanent data set named SERIES2 in the MyLib SAS library:
title 'Specifying the URL= Option to Create the SERIES Data Set'; libname _all_ clear; libname fred2 sasefred "%sysget(FRED)" URL="http://api.stlouisfed.org/fred/release/series?release_id=51" APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ; data series2; set fred2.XFREDtpu; run;
proc contents data=series2; run; title3 "First 5/Last 5 Obs, SERIES2 Data Set"; %pri10nom(series2); title3;
The returned data are stored in the XFREDTPU
data set and are copied to the permanent data set named series2.sas7bdat
in the MyLib library. A side effect of the DATA step is the automatic creation of two SAS data sets named series.sas7bdat
and seriess.sas7bdat
in the FRED2 library’s location. Fifty-seven series are returned for release_id=51; Output 48.8.1 shows the first and last five observations of the SERIES data set.
Output 48.8.1: Specifying the URL= Option to Create the SERIES Data Set—First 5 and Last 5 Observations
Specifying the URL= Option to Create the SERIES Data Set |
Obs | seriess_ORDINAL | series_ORDINAL | series_id | series_realtime_start | series_realtime_end | series_title | series_observation_start | series_observation_end | series_frequency | series_frequency_short | series_units | series_units_short | series_seasonal_adjustment | series_seasonal_adjustment_short | series_last_updated | series_popularity | series_notes |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | BOMTVLM133S | 2015-03-19 | 2015-03-19 | U.S. Imports of Services - Travel | 1992-01-01 | 2015-01-01 | Monthly | M | Million of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 07:56:13-06 | 0 | |
2 | 1 | 2 | BOMVGMM133S | 2015-03-19 | 2015-03-19 | U.S. Imports of Services - U.S. Government Misc. Services (DISCONTINUED) | 1992-01-01 | 2013-12-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2014-10-20 09:27:37-05 | 0 | BEA has introduced new table presentations, including a new presentation of services, as part of a comprehensive restructuring of BEA’s international economic accounts.For more information see http://www.bea.gov/international/revision-2014.htm. |
3 | 1 | 3 | BOMVJMM133S | 2015-03-19 | 2015-03-19 | U.S. Imports of Services - Direct Defense Expenditures (DISCONTINUED) | 1992-01-01 | 2013-12-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2014-10-20 09:26:44-05 | 0 | BEA has introduced new table presentations, including a new presentation of services, as part of a comprehensive restructuring of BEA’s international economic accounts.For more information see http://www.bea.gov/international/revision-2014.htm. |
4 | 1 | 4 | BOMVMPM133S | 2015-03-19 | 2015-03-19 | U.S. Imports of Services - Passenger Fares | 1992-01-01 | 2015-01-01 | Monthly | M | Million of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 07:56:13-06 | 0 | |
5 | 1 | 5 | BOMVOMM133S | 2015-03-19 | 2015-03-19 | U.S. Imports of Services - Other Private Services (DISCONTINUED) | 1992-01-01 | 2013-12-01 | Monthly | M | Million of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2014-10-20 09:25:54-05 | 0 | BEA has introduced new table presentations, including a new presentation of services, as part of a comprehensive restructuring of BEA’s international economic accounts.For more information see http://www.bea.gov/international/revision-2014.htm. |
6 | 1 | 53 | ITXMARM133S | 2015-03-19 | 2015-03-19 | U.S. Exports of Services: Maintenance and Repair Services, not included elsewhere | 1999-01-01 | 2015-01-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 08:16:02-06 | 0 | |
7 | 1 | 54 | ITXOBSM133S | 2015-03-19 | 2015-03-19 | U.S. Exports of Services: Other Business Services | 1999-01-01 | 2015-01-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 08:16:02-06 | 0 | |
8 | 1 | 55 | ITXTAEM133S | 2015-03-19 | 2015-03-19 | U.S. Exports of Services: Travel (for All Purposes Including Education) | 1999-01-01 | 2015-01-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 08:16:02-06 | 0 | |
9 | 1 | 56 | ITXTCIM133S | 2015-03-19 | 2015-03-19 | U.S. Exports of Services: Telecommunications, Computer, and Information Services | 1999-01-01 | 2015-01-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 08:16:02-06 | 0 | |
10 | 1 | 57 | ITXTRAM133S | 2015-03-19 | 2015-03-19 | U.S. Exports of Services: Transport | 1999-01-01 | 2015-01-01 | Monthly | M | Millions of Dollars | Mil. of $ | Seasonally Adjusted | SA | 2015-03-06 08:16:02-06 | 0 |