The SASEXFSD Interface Engine

Example 44.2 Retrieving Economic Items by Using the FQL Syntax for Function Z Score

This example shows how to use the ExtractEconData factlet to retrieve the Z score for the GRLM0347861 monthly time series for Greece over the last three years by using the FQL economic download syntax. It is not necessary to use the IDS= option, because all necessary information is contained in the ITEMS= option. The PRINT procedure uses the LABEL option to allow the time series name to be in the column heading in the output. Without the LABEL option, the column heading would be ’ECON_EXPR_DATA’.

option validvarname=any;

title 'Retrieve the Z Score Using ECON_EXPR_DATA for the US CFTNCLOI%ALLNQ100CMEF Series';
libname _all_ clear;

libname xfsd sasexfsd "%sysget(FACTSET)"
   factlet=ExtractEconData
   items="ECON_EXPR_DATA('ZSCORE(FDS_ECON[GRLM0347861],
   -5AY,step,average)',0,0/0/-3,m)"
   format=sml
   outXml=fsdecon8z
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(FACTSET)fsdecon8z.map"
   orientation=eti
   user='XXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXX';

data FQLeconFunc; set xfsd.fsdecon8z; run;
proc print data=FQLeconFunc(firstobs=1 obs=34) label; run;

Output 44.2.1: Z Score Using ECON_EXPR_DATA for the GRLM0347861 Monthly Series for Greece

Retrieve the Z Score Using ECON_EXPR_DATA for the US CFTNCLOI%ALLNQ100CMEF Series

Obs FQL_Entity date ZSCORE(FDS_ECON[GRLM0347861],-5AY,step,average)
1 econ_expr_data 04-30-2010 -1.34718
2 econ_expr_data 05-28-2010 -1.33648
3 econ_expr_data 06-30-2010 -1.42249
4 econ_expr_data 07-30-2010 -1.32352
5 econ_expr_data 08-31-2010 -1.28179
6 econ_expr_data 09-30-2010 -1.21514
7 econ_expr_data 10-29-2010 -1.01707
8 econ_expr_data 11-30-2010 -0.95096
9 econ_expr_data 12-31-2010 -0.76515
10 econ_expr_data 01-31-2011 -0.70250
11 econ_expr_data 02-28-2011 -0.54235
12 econ_expr_data 03-31-2011 -0.46460
13 econ_expr_data 04-29-2011 -0.54778
14 econ_expr_data 05-31-2011 -0.38856
15 econ_expr_data 06-30-2011 -0.51014
16 econ_expr_data 07-29-2011 -0.40330
17 econ_expr_data 08-31-2011 -0.03023
18 econ_expr_data 09-30-2011 -0.20943
19 econ_expr_data 10-31-2011 -0.06770
20 econ_expr_data 11-30-2011 0.48282
21 econ_expr_data 12-30-2011 0.49980
22 econ_expr_data 01-31-2012 0.68252
23 econ_expr_data 02-29-2012 0.82152
24 econ_expr_data 03-30-2012 0.84469
25 econ_expr_data 04-30-2012 0.81819
26 econ_expr_data 05-31-2012 0.88345
27 econ_expr_data 06-29-2012 1.09286
28 econ_expr_data 07-31-2012 1.02826
29 econ_expr_data 08-31-2012 1.19474
30 econ_expr_data 09-28-2012 1.45434
31 econ_expr_data 10-31-2012 1.43013
32 econ_expr_data 11-30-2012 1.69463
33 econ_expr_data 12-31-2012 1.59840
34 econ_expr_data 01-31-2013 .