SASEFRED Interface Engine

Example 48.3 Selecting Time Series When Native Frequency Is Less Than Requested Frequency

(View the complete code for this example.)

This example shows how to retrieve data for multiple time series that have different default frequencies. The time series are Domestic Financial Commercial Paper Outstanding (DFINCP), Domestic Nonfinancial Commercial Paper Outstanding (DNFINCP), Foreign Financial Commercial Paper Outstanding (FFINCP), Foreign Nonfinancial Commercial Paper Outstanding (FNFINCP), and Total Credit Market Assets Held by Domestic Financial Sectors (ABSITCMAHDFS). The native frequency of the first four time series is ‘Weekly’, and the native frequency of the last time series (ABSITCMAHDFS) is ‘Quarterly’. Note that the requested frequency as it is specified by the FREQ= option is ‘Weekly’ (FREQ=w). The native frequency of the last time series (ABSITCMAHDFS) is lower than the requested frequency. Therefore, this time series is excluded from the list, and only the observations that correspond to the first four time series are presented. If you want to retrieve the observations for all five time series, then the value of the FREQ= option needs to be less than or equal to all the native frequencies (here, weekly and quarterly). In this case, the valid frequency parameters would be ‘q’, ‘sa’, and ‘a’. See Example 48.4.


options validvarname=any;

title 'Selecting Time Series When Native Frequency Is Less Than Requested Frequency';
libname _all_ clear;
libname fred sasefred "%sysget(FRED)"
   OUTXML=fredex03
   AUTOMAP=replace
   MAPREF=MyMap
   XMLMAP="%sysget(FRED)fredex03.map"
   APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   IDLIST='dfincp,dnfincp,ffincp,fnfincp,absitcmahdfs'
   START='2010-01-01'
   END='2010-05-20'
   FREQ='w'
   OUTPUT=1
   FORMAT=xml;

data diffNative_freqw;
   set fred.fredex03 ;
run;
proc contents data=diffNative_freqw; run;
proc print data=diffNative_freqw; run;

Output 48.3.1: Selecting Time Series When Native Frequency Is Less Than Requested Frequency

Selecting Time Series When Native Frequency Is Less Than Requested Frequency

Obsdaterealtime_startrealtime_endDFINCPDNFINCPFFINCPFNFINCP
12010-01-062020-05-122020-05-12295.05486.8596248.61623.8856
22010-01-132020-05-122020-05-12314.99990.1067241.58325.8316
32010-01-202020-05-122020-05-12314.91490.1316230.25727.4812
42010-01-272020-05-122020-05-12369.98183.0086232.74131.3198
52010-02-032020-05-122020-05-12350.07984.0037225.00633.9657
62010-02-102020-05-122020-05-12363.93081.3051223.74036.1989
72010-02-172020-05-122020-05-12366.67683.3095226.19838.5436
82010-02-242020-05-122020-05-12385.76677.1368231.78939.0183
92010-03-032020-05-122020-05-12366.78978.7137227.76040.0659
102010-03-102020-05-122020-05-12380.09079.1665229.25240.0679
112010-03-172020-05-122020-05-12360.51784.4703224.23339.3736
122010-03-242020-05-122020-05-12355.08182.7266218.49139.8009
132010-03-312020-05-122020-05-12352.73790.5517217.74640.0196
142010-04-072020-05-122020-05-12335.23195.7690217.60740.0318
152010-04-142020-05-122020-05-12329.41893.4277209.17040.3218
162010-04-212020-05-122020-05-12326.82693.1071211.76941.5639
172010-04-282020-05-122020-05-12358.92395.2686203.35941.9364
182010-05-052020-05-122020-05-12353.77791.2651200.80643.4400
192010-05-122020-05-122020-05-12358.53190.6654190.29443.2211
202010-05-192020-05-122020-05-12330.03892.3970180.53340.9393


Last updated: June 19, 2025