SASEMOOD Interface Engine

Example 24.2 Retrieving Quarterly Gross Domestic Product Data by Industry from the Bureau of Economic Analysis (BEA)

This example shows how to retrieve gross domestic product data by industry, starting in the second quarter of 2016 and ending in the third quarter of 2018. The output, which is shown in Output 24.2.1, contains two variables, Date and PDPGPOD1Q.IUSA. The SAS system option VALIDVARNAME=ANY allows for the special character '.' in the mnemonic code; the same mnemonic code is used to name the SAS variable’s series name in the SAS output data set.

The MNEMONIC= option specifies the Moody’s time series data to retrieve, which in this example is PDPGPOD1Q.IUSA. The FREQ= option selects the quarterly frequency, and the START= and END= options define the date range of the retrieved data.


options validvarname=any;

title 'Request Gross Domestic Product by Industry, Quarterly Data';
LIBNAME moody sasemood "%sysget(MOOD_DATA)"
   mnemonic="PDPGPOD1Q.IUSA"
   user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   freq=quarterly
   conv=cubic
   outjson=GDPI
   start='2016-01-01'
   end='2018-06-01'
   format=json
   ;

data myIGDPQ;
   set moody.GDPI;
run;
proc print data=myIGDPQ; run;

Output 24.2.1: GDP by Industry: Chain-Type Price Index for Value Added – All Industries

Request Gross Domestic Product by Industry, Quarterly Data

ObsdatePDPGPOD1Q.IUSA
12016-03-31104.933
22016-06-30105.618
32016-09-30105.987
42016-12-31106.543
52017-03-31107.040
62017-06-30107.394
72017-09-30108.032
82017-12-31108.715
92018-03-31109.341
102018-06-30110.209


Last updated: July 09, 2026