SASEMOOD Interface Engine
The LIBNAME libref SASEMOOD Statement
LIBNAME libref SASEMOOD 'physical-name' options;
The LIBNAME statement assigns a SAS library reference (libref) to the physical path of the directory where the SASEMOOD interface engine stores the Moody’s data. The required physical-name argument specifies the final location of the folder where your Moody’s data reside in a SAS data set named by the OUT= option. The physical-name should end with a backslash if you are in a Windows environment or a forward slash if you are in a UNIX environment.
You can specify the following options:
- CASLIB=mood_caslib_name
specifies the name of the CAS library (caslib) where the in-memory CAS table is stored when the JSON data from Moody’s Analytics Data Buffet are read into SAS. You can use this option to name your caslib where the in-memory CAS table is stored. The default for this option is the active caslib. The GOCAS=ON option is required when you specify the CASLIB= option.
-
CASOUT=mood_castable_name
OUTCAS=mood_castable_name specifies the name of the in-memory CAS table that is created when the JSON data from Moody’s Analytics Data Buffet are read into SAS. You can use this option to name your in-memory CAS table. The default for this option is the same name that you specify in the OUT= option. The in-memory table is created only when you also specify the GOCAS=ON option.
-
CONV=CONSTANT | CUBIC | DISCRETE | LINEAR
CONVERSION=CONSTANT | CUBIC | DISCRETE | LINEAR -
specifies the technique to use to convert the native frequency to the desired frequency. You can specify the following values:
CONSTANT (or 0) converts the native frequency to a cubic frequency.
CUBIC (or 2) converts the native frequency to a constant frequency.
DISCRETE (or 3) converts the native frequency to a discrete frequency.
LINEAR (or 1) converts the native frequency to a linear frequency.
By default, CONV=CUBIC. For more about native frequency and frequency conversion, see "Using Data Buffet: The Convert Function" (Thorne 2019d).
For more information about frequency conversion, see "Using Data Buffet: How Frequency Conversion Works" (Zandi 2019) on the web page at the following URL:
https://www.economy.com/support/blog/buffet.aspx?did=FE8BEE0D-53E5-4F6A-AF55-8A9E765DCE68
- DEBUG=ON | OFF
specifies whether or not to include diagnostic message logging in the SAS log window. This information can be useful for troubleshooting a problem.
-
END=mood_endDate
ENDDATE=mood_endDate
ENDATE=mood_endDate
END_TIME=mood_endDate
ENDTIME=mood_endDate
OBSERVATION_END=mood_endDate specifies the end date of the Moody’s data that you request. Specify the mood_endDate in 'YYYY-MM-DD' format. The valid data range of available data varies with each Moody’s data set.
-
FREQ=mood_frequency
FREQUENCY=mood_frequency
INTERVAL=mood_frequency
PERIOD=mood_frequency -
specifies the desired frequency for the time series that are listed in the MNEMONIC= option. You can specify the mood_frequency as annual, quarterly, monthly, weekly, daily, and so on. Native is the default frequency when the FREQ= option is not specified. For more information about frequency conversion, see "Using Data Buffet: Caveats When Converting Low Frequencies" (Thorne 2019a). For a complete list of frequencies and their frequency codes, see Table 2.
Table 2: Frequency Codes for Moody’s Analytics Data and the FREQ= Option
Interval or Frequency Moody’s Frequency Code Description Yearly, year, annual, ann, anndec 204 Annual, year ending in December Annnov 203 Annual, year ending in November Annoct 202 Annual, year ending in October Annsep 201 Annual, year ending in September Annaug 200 Annual, year ending in August Annjul 199 Annual, year ending in July Annjun 198 Annual, year ending in June Annmay 197 Annual, year ending in May Annapr 196 Annual, year ending in April Annmar 195 Annual, year ending in March Annfeb 194 Annual, year ending in February Annjan 193 Annual, year ending in January Semiannual 188 Semiannual, year ending in December Semnov 187 Semiannual, year ending in November Semoct 186 Semiannual, year ending in October Semsep 185 Semiannual, year ending in September Semaug 184 Semiannual, year ending in August Semjul 183 Semiannual, year ending in July Quarterly, Qtr, Qtrdec, Quarter 172 Quarterly, year ending in December Qtrnov 171 Quarterly, year ending in November Qtroct 170 Quarterly, year ending in October Bimdec 156 Bimonthly, year ending in December Bimnov 155 Bimonthly, year ending in November Monthly, mon, month 128 Monthly Semmon 112 Semimonthly, 15th and end of month Bwsat2 110 Biweekly, ending on alternating Saturdays, starting Jan. 26, 1850, Feb. 9, 1850, …, Dec. 30, 2017, Jan. 13, 2018, Jan. 27, 2018 Bwfri2 109 Biweekly, ending on alternating Fridays, starting Jan. 25, 1850, Feb. 8, 1850, …, Dec. 29, 2017, Jan. 12, 2018, Jan. 26, 2018 Bwthu2 108 Biweekly, ending on alternating Thursdays, starting Jan. 24, 1850, Feb. 7, 1850, …, Dec. 28, 2017, Jan. 11, 2018, Jan. 25, 2018 Bwwed2 107 Biweekly, ending on alternating Wednesdays, starting Jan. 23, 1850, Feb. 6, 1850, …, Dec. 27, 2017, Jan. 10, 2018, Jan. 24, 2018 Bwtue2 106 Biweekly, ending on alternating Tuesdays, starting Jan. 22, 1850, Feb. 5, 1850, …, Dec. 26, 2017, Jan. 9, 2018, Jan. 23, 2018 Bwmon2 105 Biweekly, ending on alternating Mondays, starting Jan. 21, 1850, Feb. 4, 1850, …, Dec. 25, 2017, Jan. 8, 2018, Jan. 22, 2018 Bwsun2 104 Biweekly, ending on alternating Sundays, starting Jan. 20, 1850, Feb. 3, 1850, …, Dec. 24, 2017, Jan. 7, 2018, Jan. 21, 2018 Bwsat1 103 Biweekly, ending on alternating Saturdays, starting Jan. 19, 1850, Feb. 2, 1850, …, Dec. 23, 2017, Jan. 6, 2018, Jan. 20, 2018 Bwfri1 102 Biweekly, ending on alternating Fridays, starting Jan. 18, 1850, Feb. 1, 1850, …, Dec. 22, 2017, Jan. 5, 2018, Jan. 19, 2018 Bwthu1 101 Biweekly, ending on alternating Thursdays, starting Jan. 17, 1850, Jan. 31, 1850, …, Dec. 21, 2017, Jan. 4, 2018, Jan. 18, 2018 Bwwed1 100 Biweekly, ending on alternating Wednesdays, starting Jan. 16, 1850, Jan. 30, 1850, …, Dec. 20, 2017, Jan. 3, 2018, Jan. 17, 2018 Bwtue1 99 Biweekly, ending on alternating Tuesdays, starting Jan. 15, 1850, Jan. 29, 1850, …, Dec. 19, 2017, Jan. 2, 2018, Jan. 16, 2018 Bwmon1 98 Biweekly, ending on alternating Mondays, starting Jan. 14, 1850, Jan. 28, 1850, …, Dec. 18, 2017, Jan. 1, 2018, Jan. 15, 2018 Bwsun1 97 Biweekly, ending on alternating Sundays, starting Jan. 27, 1850, Feb. 10, 1850, …, Dec. 31, 2017, Jan. 14, 2018, Jan. 28, 2018 Tenday 80 Three times a month: 10th, 20th, and end of month Weekly, week, wsaturday 71 Weekly, ending Saturday Wfriday, wfri 70 Weekly, ending Friday Wthursday, wthu 69 Weekly, ending Thursday Wwednesday, wwed 68 Weekly, ending Wednesday Wtuesday, wtue 67 Weekly, ending Tuesday WMonday, wmon 66 Weekly, ending Monday Wsunday, wsun 65 Weekly, ending Sunday Business, busin, bus 50 Business daily, Monday through Friday Daily, day 49 Daily Index 16 INDEX Default 0 Native
- GOCAS=ON | OFF
specifies whether to create (ON) or not create (OFF) an in-memory CAS table of the Moody’s data (in addition to the SAS data set that is created). When GOCAS=ON, the SASEMOOD engine assumes that there is an active CAS session running when it executes the LIBNAME statement. By default, GOCAS=OFF.
-
MNEMONIC='mood_mnemonic_list'
ID='mood_mnemonic_list'
IDS='mood_mnemonic_list' -
specifies the Moody’s mnemonic code (or codes) that enables you to access the data set that corresponds to that code. Each mnemonic code consists of a concept code and a geography code, separated by a period (.). When you want more than one mnemonic code, specify the mnemonic codes in a list, separated by semicolons. There are too many codes to list here; you can view the catalog of the available list by visiting the web page at the following URL:
-
OUT=mood_jsonfile
OUTJSON=mood_jsonfile
JSON=mood_jsonfile specifies the name of both the JSON file (downloaded) and the SAS data set that is created when the JSON data are read into SAS. You can use the OUT= option to name your JSON data file. It is stored in the SAS
Worklibrary. The SAS data set that is created (when the JSON data are read into SAS) is stored in the folder specified by physical-name, and you can refer to it by using the myLib libref in your LIBNAME statement.-
PASS='mood_password'
ENCRYPTKEY='mood_password' specifies the unique PASS (password) encryption key that Moody’s Analytics assigns to the user (subscriber) to provide security for accessing the Moody’s Analytics Data Buffet online data.
-
USER='mood_user'
ACCESSKEYID='mood_user' specifies the unique USER access key that Moody’s Analytics assigns to the user (subscriber) to allow access to the Moody’s Analytics Data Buffet API service.
-
START=mood_start
STARTDATE=mood_start
STDATE=mood_start
START_TIME=mood_start
STARTTIME=mood_start
BEGIN=mood_start
OBSERVATION_START=mood_start specifies the start date for the Moody’s data that you request. Specify the data in 'YYYY-MM-DD' format. The valid date range for available data varies with each Moody’s data set.
-
TRANS=0 | 1 | 2 | 3 | 4 | 8
TRANSFORMATION=0 | 1 | 2 | 3 | 4 | 8 -
specifies the transformation function to be performed on the selected series. You can specify the following values:
0 indicates none.
1 indicates year-over-year percentage change.
2 indicates simple difference.
3 indicates annualized growth.
4 indicates percentage change.
8 indicates year-over-year difference.
By default, TRANS=0 (no transformation). For more information about Moody’s transformations, see "Using Data Buffet: Transformations" (Thorne 2019e) at the following URL:
https://www.economy.com/support/blog/buffet.aspx?did=783658E9-93DA-4F85-A206-9D14FC44904F