
This example shows how to use the ExtractEconData factlet and two database sources, FDS_ECON_DATA and EURO_STAT_DATA, to retrieve two time series for the last 11 months by using the FQL economic download syntax. The database source name is prepended to the time series name to retain the integrity of the name of the database source (dbsource). Only the same frequency and same range of observations for multiple series can be requested concurrently.
option validvarname=any;
title 'Retrieve Monthly Data from Two Database Sources: FDS_ECON_DATA and EURO_STAT';
libname _all_ clear;
libname xfsd sasexfsd "%sysget(FACTSET)"
factlet=ExtractEconData
items="FDS_ECON_DATA('FRBIPSB50001',-11,-1,M,STEP,AVERAGE,1),
EURO_STAT_DATA('CONSCONFBAL@EUZ',-11,-1,M)"
format=sml
outXml=fsdecon17
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdecon17.map"
orientation=eti
user='XXXXXXXXXXXXXXXX'
pass='XXXXXXXXXXXXXXXX';
data TwoSources; set xfsd.fsdecon17; run;
proc print data=TwoSources; run;
Output 52.5.1: Two Monthly Series Using Two Database Sources: FDS_ECON_DATA and EURO_STAT_DATA
| Retrieve Monthly Data from Two Database Sources: FDS_ECON_DATA and EURO_STAT |
| Obs | FQL_ENTITY | date | fds_econ_data FRBIPSB50001 |
euro_stat_data CONSCONFBAL@EUZ |
|---|---|---|---|---|
| 1 | fds_econ_data | 04-30-2012 | 96.8572 | -19.7000 |
| 2 | fds_econ_data | 05-31-2012 | 97.1042 | -19.1000 |
| 3 | fds_econ_data | 06-29-2012 | 97.1322 | -19.6000 |
| 4 | fds_econ_data | 07-31-2012 | 97.5571 | -21.3000 |
| 5 | fds_econ_data | 08-31-2012 | 96.7850 | -24.4000 |
| 6 | fds_econ_data | 09-28-2012 | 96.9549 | -25.7000 |
| 7 | fds_econ_data | 10-31-2012 | 96.8281 | -25.5000 |
| 8 | fds_econ_data | 11-30-2012 | 98.0201 | -26.7000 |
| 9 | fds_econ_data | 12-31-2012 | 98.1594 | -26.3000 |
| 10 | fds_econ_data | 01-31-2013 | 98.3042 | -23.9000 |
| 11 | fds_econ_data | 02-28-2013 | 99.0446 | -23.6000 |