SASEMOOD Interface Engine

Example 24.6 Retrieving Unemployment Rate Data for the United States

This example shows how to retrieve unemployment rate data for United States (total), starting in January 1973 and ending in January 2019. The output is shown in Output 24.6.1. The MNEMONIC= option specifies the Moody’s data set to retrieve the data from; its mnemonic code is LBR.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 START= and END= options define the date range. Although the native frequency of this series is monthly, the request is for an annual frequency, using the cubic conversion in the CONV= option.


options validvarname=any;

title 'Request Unemployment Data, Annual Frequency Using Cubic Conversion';
LIBNAME moody sasemood "%sysget(MOOD_DATA)"
   mnemonic="LBR.IUSA"
   user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   freq=annual     /* Convert from monthly to annual frequency */
   conv=cubic
   outjson=labor
   start='1973-01-01'
   end='2019-01-01'
   format=json
   ;

data myLabor;
    set moody.labor;
run;

proc print data=work.myLabor; run;

Output 24.6.1: US Unemployment Rate: Total (%, SA)

Request Unemployment Data, Annual Frequency Using Cubic Conversion

ObsdateLBR.IUSA
11973-12-314.85833
21974-12-315.64167
31975-12-318.47500
41976-12-317.70000
51977-12-317.05000
61978-12-316.06667
71979-12-315.85000
81980-12-317.17500
91981-12-317.61667
101982-12-319.70833
111983-12-319.60000
121984-12-317.50833
131985-12-317.19167
141986-12-317.00000
151987-12-316.17500
161988-12-315.49167
171989-12-315.25833
181990-12-315.61667
191991-12-316.85000
201992-12-317.49167
211993-12-316.90833
221994-12-316.10000
231995-12-315.59167
241996-12-315.40833
251997-12-314.94167
261998-12-314.50000
271999-12-314.21667
282000-12-313.96667
292001-12-314.74167
302002-12-315.78333
312003-12-315.99167
322004-12-315.54167
332005-12-315.08333
342006-12-314.60833
352007-12-314.61667
362008-12-315.80000
372009-12-319.28333
382010-12-319.60833
392011-12-318.93333
402012-12-318.07500
412013-12-317.35833
422014-12-316.15833
432015-12-315.27500
442016-12-314.87500
452017-12-314.34167
462018-12-313.89167
472019-12-313.66667


Last updated: July 09, 2026