SASEMOOD Interface Engine

Example 24.5 Retrieving GDP by Industry: Chain-Type Price Index for Value Added for the United States

This example shows how to retrieve multiple time series for GDP by industry—utilities, manufacturing, finance, and all industries—starting January 1, 2016, and ending June 1, 2018. The MNEMONIC= option specifies the Moody’s data to retrieve. This example lists four mnemonic codes, separated by semicolons. The FREQ= option specifies quarterly data intervals, and the START= and END= options define the date range of the data. The output is shown in Output 24.5.1, which contains five variables: Date, PDPGPOD1Q.IUSA, PDPGPO22D1Q.IUSA, PDPGPOMFD1Q.IUSA, and PDPGPOFID1Q.IUSA. The SAS system option VALIDVARNAME=ANY allows for the special character '.' in the mnemonic name list; this list is used to name the SAS variables (time series) in the SAS output data set.


options validvarname=any;

title 'Request Gross Domestic Product by Industry for Multiple Time Series';
LIBNAME moody sasemood "%sysget(MOOD_DATA)"
   mnemonic="PDPGPOD1Q.IUSA;PDPGPO22D1Q.IUSA;PDPGPOMFD1Q.IUSA;PDPGPOFID1Q.IUSA"
   user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   mnemonic="PDPGPOD1Q.IUSA;PDPGPO22D1Q.IUSA;PDPGPOMFD1Q.IUSA;PDPGPOFID1Q.IUSA"
   freq=quarterly
   conv=cubic
   outjson=incGDP
   start='2016-01-01'
   end='2018-06-01'
   format=json;

   data myIGDPQ;
      set moody.incGDP;
   run;
proc print data=work.myIGDPQ; run;

Output 24.5.1: Four Time Series for GDP by Industry: Utilities, Manufacturing, Insurance, and All Industries

Request Gross Domestic Product by Industry for Multiple Time Series

ObsdatePDPGPOD1Q.IUSAPDPGPO22D1Q.IUSAPDPGPOMFD1Q.IUSAPDPGPOFID1Q.IUSA
12016-03-31104.933107.363103.553112.061
22016-06-30105.618107.974103.663113.373
32016-09-30105.987109.396103.388114.571
42016-12-31106.543108.743104.032115.582
52017-03-31107.040109.983104.439115.557
62017-06-30107.394111.066104.183116.405
72017-09-30108.032111.542105.476117.472
82017-12-31108.715111.480106.157119.072
92018-03-31109.341115.945106.367120.243
102018-06-30110.209113.648107.424121.325


Last updated: July 09, 2026