The SASEXFSD Interface Engine (Experimental)

Example 43.9 Retrieving Standardized Economic Items for Multiple Countries

This example shows how to use the ExtractEconData factlet to retrieve standardized government debt values, reflecting debt in billions of dollars at year end for the United States and Greece and using the country identifiers CC_US and CC_GR and the standardized FactSet economic code FDS_ECON_GDP_USD_Y.

title 'Retrieve Standardized Economic Items for Multiple Countries (US,GR)';
libname _all_ clear;

libname xfsd sasexfsd "%sysget(FACTSET)"
   factlet=ExtractEconData
   ids='CC_US,CC_GR'
   items='FDS_ECON_GDP_USD_Y'
   dates='-6:-1:y'
   period=QTR
   format=sml
   outXml=fsdex06
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(FACTSET)fsdex06.map"
   orientation=eti
   user='XXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXX';

data econStnd;
   set xfsd.fsdex06;
run;
proc print
   data=econStnd;
run;

Output 43.9.1: Standardized Economic Items for Multiple Countries

Retrieve Standardized Economic Items for Multiple Countries (US,GR)

Obs FQL_Entity date fds_econ_gdp_usd_y
1 CC_US 12-31-2005 12623.00
2 CC_US 12-31-2006 13377.20
3 CC_US 12-31-2007 14028.70
4 CC_US 12-31-2008 14291.50
5 CC_US 12-31-2009 13939.00
6 CC_US 12-31-2010 14526.50
7 CC_GR 12-31-2005 239.78
8 CC_GR 12-31-2006 262.20
9 CC_GR 12-31-2007 305.01
10 CC_GR 12-31-2008 340.83
11 CC_GR 12-31-2009 322.12
12 CC_GR 12-31-2010 300.87