SASEFRED Interface Engine

Syntax: SASEFRED Interface Engine

The SASEFRED interface engine uses standard engine syntax to read the observations or data values for one or more economic time series. Table 1 summarizes the options that the SASEFRED engine uses. There are two required options: APIKEY=’fred_apikey’ and ID_LIST=’fred_idlist’.

Table 1: Summary of LIBNAME libref SASEFRED Options

Option Description
AGG= Specifies the aggregation method used for frequency aggregation. The valid aggregation arguments are ’avg’, ’sum’, and ‘eop’; the default is ‘avg’.
APIKEY= Specifies the required FRED access key that enables you to access the data that the FRED website provides
AUTOMAP= Specifies whether or not to overwrite the existing XML map file
CASLIB= Specifies the name of the caslib where the in-memory CAS table containing the FRED data is stored
CASOUT= Specifies the name of the in-memory CAS table, which contains the data that the SASEFRED interface engine returns
CONNECT= Specifies whether or not you need the connect method for a secure connection via a proxy server. You must specify the PROXY= option when you use the CONNECT=ON option. See the PROXY= option.
DEBUG= Specifies whether or not you need diagnostic message logging in the SAS log window
END= Specifies the end date for the observation period (YYYY-MM-DD formatted string, optional; the default is 1776-07-04 (earliest available))
FORMAT= Specifies a file extension that indicates the type of file to retrieve. Only XML is supported.
FREQ= Specifies the reporting frequency of the selected data (lower frequency to aggregate values to): ‘m’ for monthly, ‘d’ for daily. The FRED frequency aggregation feature converts higher-frequency data series to lower-frequency time series (such as converting a monthly time series to an annual time series). For the complete list of frequencies, see Table 2.
GOCAS= Specifies whether to generate an in-memory CAS table for the FRED data
IDLIST= Specifies a list of time series IDs for accessing FRED data. To select more than one time series, list the unique time series IDs, separated by commas.
LIMIT= Specifies the maximum number of observations (rows) to return (integer between 1 and 100,000, optional; the default is 100,000)
MAPREF= Specifies the fileref used for the map file assignment
OFFSET= Specifies the number of rows (observations) to skip in the returned data set
OUTPUT= Specifies an output type. The valid output arguments are ‘1’ for Observations by Real-Time Period; ‘2’ for Observations by Vintage Date, All Observations; ‘3’ for Observations by Vintage Date, New and Revised Observations Only; and ‘4’ for Observations, Initial Release Only (integer, optional; the default is ‘1’).
OUTXML= Specifies the name of the output SAS data set and the XML file(s) requested by the IDLIST= option. When more than one time series ID is listed in the IDLIST= option, then the SASEFRED engine appends the positional integer ('1' for the first time series ID, '2' for the second time series ID, and so on) to the name specified by the OUTXML= option.
PROXY= Specifies the proxy server that you want to use (if you have trouble connecting without specifying a proxy). If you also need the connect method for a secure connection, use the CONNECT=ON option in addition to the PROXY= option. See the CONNECT= option.
RTSTART= Specifies the real-time start date for the observation period (YYYY-MM-DD formatted string, optional; the default is today)
RTEND= Specifies the real-time end date for the observation period (YYYY-MM-DD formatted string, optional; the default is today)
SORT= Specifies the order of the results in ascending or descending observation_date order. The valid sort arguments are ‘asc’ and ‘desc’; the default is ‘asc’.
START= Specifies the start date for the observation period (YYYY-MM-DD formatted string, optional; the default is 9999-12-31 (latest available))
UNITS= Specifies a data value transformation. The valid units arguments are ‘lin’, ‘chg’, ‘ch1’, ‘pch’, ‘pc1’, ‘pca’, ‘cch’, ‘cca’, and ‘log’; the default is ‘lin’. For more information about units, see Table 3.
URL= Specifies a URL from which to request useful information about available releases, vintage dates, tags, categories, sources, and series. The information is downloaded from the specified URL and stored in the XFREDTPU data set (a temporary utility data set), which can then be saved or renamed to a permanent SAS data set.
USER= Specifies the location of the writable folder where you permanently store data sets that have one-level names
VINTAGE= Specifies one or more dates in history. Vintage dates are used to download data as they existed on that specific date in history (YYYY-MM-DD formatted string, optional; by default no vintage dates are set). You can request one or many vintage dates at a time; dates are in YYYY-MM-DD format and are separated by commas (no blanks allowed). For multiple vintage dates, specify OUTPUT=2 for all observations or OUTPUT=3 for only new or revised observations.
XMLMAP= specifies the fully qualified name of the location where the XMLmap file is automatically stored. By default, XMLMAP=Fred.map.


Last updated: June 19, 2025