This example shows how to use the ExtractEconData factlet to retrieve the Returns for the GDPEURNS quarterly time series for Greece over the last 10 years by using the FQL economic download syntax. It is not necessary to use the IDS= option, because the FQL downloading syntax allows ’\@@GR’ to be appended to the series name 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 Returns Using ECON_EXPR_DATA for the GDPEURNS@GR Series'; libname _all_ clear; libname xfsd sasexfsd "%sysget(FACTSET)" factlet=ExtractEconData items="ECON_EXPR_DATA('RETURNS(EURO_STAT[GDPEURNS@GR],-1AQ,4)',0,0/0/-10,q)" format=sml outXml=fsdecon20 automap=replace mapref=MyMap xmlmap="%sysget(FACTSET)fsdecon20.map" orientation=eti user='XXXXXXXXXXXXXXXX' pass='XXXXXXXXXXXXXXXX'; data EUROFunc; set xfsd.fsdecon20; run; proc print data=EUROFunc label; run;
Output 44.3.1: Quarterly Returns of Series GDPEURNS@GR Using ECON_EXPR_DATA for Database Source Name EURO_STAT
Retrieve Returns Using ECON_EXPR_DATA for the GDPEURNS@GR Series |
Obs | FQL_Entity | date | RETURNS(EURO_STAT[GDPEURNS@GR],-1AQ,4) |
---|---|---|---|
1 | econ_expr_data | 06-30-2003 | 39.9255 |
2 | econ_expr_data | 09-30-2003 | 24.1206 |
3 | econ_expr_data | 12-31-2003 | -2.9307 |
4 | econ_expr_data | 03-31-2004 | -21.9838 |
5 | econ_expr_data | 06-30-2004 | 44.4186 |
6 | econ_expr_data | 09-30-2004 | 21.6794 |
7 | econ_expr_data | 12-31-2004 | -3.2521 |
8 | econ_expr_data | 03-31-2005 | -28.4104 |
9 | econ_expr_data | 06-30-2005 | 32.7385 |
10 | econ_expr_data | 09-30-2005 | 31.6561 |
11 | econ_expr_data | 12-30-2005 | -6.1976 |
12 | econ_expr_data | 03-31-2006 | -17.0596 |
13 | econ_expr_data | 06-30-2006 | 40.5935 |
14 | econ_expr_data | 09-29-2006 | 19.2535 |
15 | econ_expr_data | 12-29-2006 | -0.3652 |
16 | econ_expr_data | 03-30-2007 | -21.9820 |
17 | econ_expr_data | 06-29-2007 | 39.1451 |
18 | econ_expr_data | 09-28-2007 | 23.8728 |
19 | econ_expr_data | 12-31-2007 | -7.5605 |
20 | econ_expr_data | 03-31-2008 | -20.5704 |
21 | econ_expr_data | 06-30-2008 | 37.8653 |
22 | econ_expr_data | 09-30-2008 | 20.0536 |
23 | econ_expr_data | 12-31-2008 | -19.1250 |
24 | econ_expr_data | 03-31-2009 | -38.6740 |
25 | econ_expr_data | 06-30-2009 | 65.9728 |
26 | econ_expr_data | 09-30-2009 | 11.6375 |
27 | econ_expr_data | 12-31-2009 | 6.0947 |
28 | econ_expr_data | 03-31-2010 | -39.8820 |
29 | econ_expr_data | 06-30-2010 | 35.5932 |
30 | econ_expr_data | 09-30-2010 | 10.4348 |
31 | econ_expr_data | 12-31-2010 | -22.8435 |
32 | econ_expr_data | 03-31-2011 | -33.6109 |
33 | econ_expr_data | 06-30-2011 | 43.5848 |
34 | econ_expr_data | 09-30-2011 | 15.9831 |
35 | econ_expr_data | 12-30-2011 | -30.2577 |
36 | econ_expr_data | 03-30-2012 | -33.0359 |
37 | econ_expr_data | 06-29-2012 | 41.0717 |
38 | econ_expr_data | 09-28-2012 | . |
39 | econ_expr_data | 12-31-2012 | . |
40 | econ_expr_data | 03-28-2013 | . |