The SASEXFSD Interface Engine (Experimental)

Example 43.2 Retrieving Price and Sales Data for Multiple Companies

This example shows how to use the ExtractFormulaHistory factlet to retrieve several data items for several companies. The data items are price and sales, and the companies are IBM and FactSet (FDS).

title 'Retrieve Price and Sales Data for IBM and FactSet (FDS)';
libname _all_ clear;

libname xfsd sasexfsd "%sysget(FACTSET)"
   factlet=ExtractFormulaHistory
   ids='ibm,fds'
   items='p_price,ff_sales'
   dates='20110130:20110631:m'
   format=sml
   outXml=fsdex02
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(FACTSET)fsdex02.map"
   orientation=eti
   user='XXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXX';

data priceSale;
   set xfsd.fsdex02;
run;
proc print
   data=priceSale;
run;

Output 43.2.1: Multiple Data Items for IBM and FactSet

Retrieve Price and Sales Data for IBM and FactSet (FSD)

Obs FQL_ENTITY date ff_sales p_price
1 ibm 01-31-2011 162.000 99870.00
2 ibm 02-28-2011 161.880 99870.00
3 ibm 03-31-2011 163.070 99870.00
4 ibm 04-30-2011 170.580 99870.00
5 ibm 05-31-2011 168.930 99870.00
6 ibm 06-30-2011 171.550 99870.00
7 fsd 01-31-2011 18.906 2.55
8 fsd 02-28-2011 19.070 2.55
9 fsd 03-31-2011 18.960 2.55
10 fsd 04-30-2011 19.140 2.55
11 fsd 05-31-2011 19.230 2.55
12 fsd 06-30-2011 18.737 2.55