The SASEXFSD Interface Engine

Example 44.13 Retrieving Multiple Items for Multiple Companies from an OFDB File

This example shows how to use the ExtractOFDBItem factlet to retrieve the uploaded share and price data for IBM and Microsoft from an OFDB file named SASTESTING for an absolute date range, starting February 27, 2012, and ending February 28, 2012, with a monthly frequency.

title 'Retrieve Shares and Price Data for IBM and MSFT from an OFDB File';
libname _all_ clear;

libname xfsd sasexfsd "%sysget(FACTSET)"
   factlet=ExtractOFDBItem
   ofdb='SASTESTING.OFDB'
   ids='ibm,msft'
   items='shares,price'
   dates='20120227:20120228:d'
   period=QTR
   format=sml
   outXml=fsdex07
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(FACTSET)fsdex07.map"
   orientation=eti
   user='XXXXXXXXXXXXXXXX'
   pass='XXXXXXXXXXXXXXXX';

data shareOFDB; set xfsd.fsdex07; run;
proc print data=shareOFDB; run;

Output 44.13.1: Multiple Items for Multiple Companies from an OFDB File

Retrieve Shares and Price Data for IBM and MSFT from an OFDB File

Obs FQL_ENTITY date ofdb_shares ofdb_price
1 ibm 02-27-2012 1178.60 1.000
2 ibm 02-28-2012 1178.60 197.980
3 msft 02-27-2012 8412.20 1.000
4 msft 02-28-2012 8412.20 31.870