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;
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 |
| Obs | date | LBR.IUSA |
|---|---|---|
| 1 | 1973-12-31 | 4.85833 |
| 2 | 1974-12-31 | 5.64167 |
| 3 | 1975-12-31 | 8.47500 |
| 4 | 1976-12-31 | 7.70000 |
| 5 | 1977-12-31 | 7.05000 |
| 6 | 1978-12-31 | 6.06667 |
| 7 | 1979-12-31 | 5.85000 |
| 8 | 1980-12-31 | 7.17500 |
| 9 | 1981-12-31 | 7.61667 |
| 10 | 1982-12-31 | 9.70833 |
| 11 | 1983-12-31 | 9.60000 |
| 12 | 1984-12-31 | 7.50833 |
| 13 | 1985-12-31 | 7.19167 |
| 14 | 1986-12-31 | 7.00000 |
| 15 | 1987-12-31 | 6.17500 |
| 16 | 1988-12-31 | 5.49167 |
| 17 | 1989-12-31 | 5.25833 |
| 18 | 1990-12-31 | 5.61667 |
| 19 | 1991-12-31 | 6.85000 |
| 20 | 1992-12-31 | 7.49167 |
| 21 | 1993-12-31 | 6.90833 |
| 22 | 1994-12-31 | 6.10000 |
| 23 | 1995-12-31 | 5.59167 |
| 24 | 1996-12-31 | 5.40833 |
| 25 | 1997-12-31 | 4.94167 |
| 26 | 1998-12-31 | 4.50000 |
| 27 | 1999-12-31 | 4.21667 |
| 28 | 2000-12-31 | 3.96667 |
| 29 | 2001-12-31 | 4.74167 |
| 30 | 2002-12-31 | 5.78333 |
| 31 | 2003-12-31 | 5.99167 |
| 32 | 2004-12-31 | 5.54167 |
| 33 | 2005-12-31 | 5.08333 |
| 34 | 2006-12-31 | 4.60833 |
| 35 | 2007-12-31 | 4.61667 |
| 36 | 2008-12-31 | 5.80000 |
| 37 | 2009-12-31 | 9.28333 |
| 38 | 2010-12-31 | 9.60833 |
| 39 | 2011-12-31 | 8.93333 |
| 40 | 2012-12-31 | 8.07500 |
| 41 | 2013-12-31 | 7.35833 |
| 42 | 2014-12-31 | 6.15833 |
| 43 | 2015-12-31 | 5.27500 |
| 44 | 2016-12-31 | 4.87500 |
| 45 | 2017-12-31 | 4.34167 |
| 46 | 2018-12-31 | 3.89167 |
| 47 | 2019-12-31 | 3.66667 |