The SASEFRED Interface Engine

Example 48.12 Series for a Specific Category with the URL= Option

The following statements demonstrate how to use the URL= option to obtain the SERIES data set for a specific category and how to create a permanent data set named SERIES_CAT5 in the MyLib SAS library:


title 'Specifying the URL= Option to Create the SERIES_CAT5 Data Set';
libname _all_ clear;
libname mylib "U:\fred940\doc\";

libname fred5 sasefred "U:\fred940\test\"
   debug=on
   URL="http://api.stlouisfed.org/fred/category/series?category_id=125"
   APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   ;

data mylib.series_cat5;
   set fred5.XFREDtpu;
run;
proc print
   data=mylib.series_cat5;
run;

proc contents
   data=mylib.series_cat5;
run;

The returned data are stored in the XFREDTPU data set and are copied to the permanent data set named series_cat5.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 FRED5 library’s location. Forty-five series are returned for the specified category ID, as shown in Output 48.12.1.

Output 48.12.1: Specifying the URL= Option to Create the SERIES_CAT5 Data Set

Specifying the URL= Option to Create the SERIES_CAT5 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 BOPBCA 2015-03-19 2015-03-19 Balance on Current Account (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:28-05 57 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
2 1 2 BOPBCAA 2015-03-19 2015-03-19 Balance on Current Account (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 34 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
3 1 3 BOPBCAN 2015-03-19 2015-03-19 Balance on Current Account (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 28 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
4 1 4 BOPBGS 2015-03-19 2015-03-19 Balance on Goods and Services (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:28-05 28 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
5 1 5 BOPBGSA 2015-03-19 2015-03-19 Balance on Goods and Services (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 14 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
6 1 6 BOPBGSN 2015-03-19 2015-03-19 Balance on Goods and Services (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
7 1 7 BOPBII 2015-03-19 2015-03-19 Balance on Investment Income (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
8 1 8 BOPBIIA 2015-03-19 2015-03-19 Balance on Investment Income (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
9 1 9 BOPBIIN 2015-03-19 2015-03-19 Balance on Investment Income (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
10 1 10 BOPBM 2015-03-19 2015-03-19 Balance on Merchandise Trade (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 18 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
11 1 11 BOPBMA 2015-03-19 2015-03-19 Balance on Merchandise Trade (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
12 1 12 BOPBMN 2015-03-19 2015-03-19 Balance on Merchandise Trade (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
13 1 13 BOPBSV 2015-03-19 2015-03-19 Balance on Services (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
14 1 14 BOPBSVA 2015-03-19 2015-03-19 Balance on Services (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
15 1 15 BOPBSVN 2015-03-19 2015-03-19 Balance on Services (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
16 1 16 BOPCAT 2015-03-19 2015-03-19 Capital Account Transactions, Net (Discontinued Series) 1989-10-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:26-05 23 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
17 1 17 BOPCATA 2015-03-19 2015-03-19 Capital Account Transactions, Net (Discontinued Series) 1989-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:26-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
18 1 18 BOPCATN 2015-03-19 2015-03-19 Capital Account Transactions, Net (Discontinued Series) 1989-10-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:26-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
19 1 19 BOPG 2015-03-19 2015-03-19 Unilateral Transfers, Net (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:26-05 27 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
20 1 20 BOPGA 2015-03-19 2015-03-19 Unilateral Transfers, Net (Discontinued Series) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:25-05 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
21 1 21 BOPGN 2015-03-19 2015-03-19 Unilateral Transfers, Net (Discontinued Series) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:25-05 0 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (http://www.bea.gov/international/modern.htm). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
22 1 22 BOPGSTB 2015-03-19 2015-03-19 Trade Balance: Goods and Services, Balance of Payments Basis 1992-01-01 2015-01-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-06 07:56:13-06 65  
23 1 23 BOPGTB 2015-03-19 2015-03-19 Trade Balance: Goods, Balance of Payments Basis 1992-01-01 2015-01-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-06 07:56:14-06 40  
24 1 24 BOPSTB 2015-03-19 2015-03-19 Trade Balance: Services, Balance of Payments Basis 1992-01-01 2015-01-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-06 07:56:14-06 21  
25 1 25 IEABC 2015-03-19 2015-03-19 Balance on current account 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:18-05 43 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
26 1 26 IEABCA 2015-03-19 2015-03-19 Balance on current account 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:09-05 24 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
27 1 27 IEABCG 2015-03-19 2015-03-19 Balance on goods 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:18-05 11 Calculated by subtracting the imports of goods from the exports of goods
28 1 28 IEABCGA 2015-03-19 2015-03-19 Balance on goods 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:09-05 0 Calculated by subtracting the imports of goods from the exports of goods
29 1 29 IEABCGN 2015-03-19 2015-03-19 Balance on goods 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:18-05 11 Calculated by subtracting the imports of goods from the exports of goods
30 1 30 IEABCGS 2015-03-19 2015-03-19 Balance on goods and services 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:17-05 22 Calculated by subtracting the imports of goods and services from the exports of goods and services
31 1 31 IEABCGSA 2015-03-19 2015-03-19 Balance on goods and services 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:08-05 0 Calculated by subtracting the imports of goods and services from the exports of goods and services
32 1 32 IEABCGSN 2015-03-19 2015-03-19 Balance on goods and services 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 0 Calculated by subtracting the imports of goods and services from the exports of goods and services
33 1 33 IEABCN 2015-03-19 2015-03-19 Balance on current account 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 24 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
34 1 34 IEABCP 2015-03-19 2015-03-19 Balance on capital account 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:17-05 35 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
35 1 35 IEABCPA 2015-03-19 2015-03-19 Balance on capital account 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:08-05 30 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
36 1 36 IEABCPI 2015-03-19 2015-03-19 Balance on primary income 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:17-05 7 Calculated by subtracting the primary income payments from the primary income receipts
37 1 37 IEABCPIA 2015-03-19 2015-03-19 Balance on primary income 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:08-05 14 Calculated by subtracting the primary income payments from the primary income receipts
38 1 38 IEABCPIN 2015-03-19 2015-03-19 Balance on primary income 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 7 Calculated by subtracting the primary income payments from the primary income receipts
39 1 39 IEABCPN 2015-03-19 2015-03-19 Balance on capital account 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 20 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
40 1 40 IEABCS 2015-03-19 2015-03-19 Balance on services 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:17-05 11 Calculated by subtracting the imports of services from the exports of services
41 1 41 IEABCSA 2015-03-19 2015-03-19 Balance on services 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:08-05 0 Calculated by subtracting the imports of services from the exports of services
42 1 42 IEABCSI 2015-03-19 2015-03-19 Balance on secondary income 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2015-03-19 08:36:17-05 0 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
43 1 43 IEABCSIA 2015-03-19 2015-03-19 Balance on secondary income 1999-01-01 2014-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:56:08-05 0 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
44 1 44 IEABCSIN 2015-03-19 2015-03-19 Balance on secondary income 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 0 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
45 1 45 IEABCSN 2015-03-19 2015-03-19 Balance on services 1999-01-01 2014-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2015-03-19 08:36:17-05 0 Calculated by subtracting the imports of services from the exports of services