Retrieving Price Data for One Company
/*------------------------------------------------------------------------
SAS SAMPLE LIBRARY
Name: fsdex01.sas
Description: Example program from SAS/ETS User's Guide,
The SASEXFSD Interface Engine
Title: Retrieving Price Data for One Company
Product: SAS/ETS Software
Keys: FactSet data extraction
Procs: SASEXFSD
Notes: Read this before you run this sample.
The sample data provided resides in the ets/sasmisc folder.
If you are using automap=READONLY, then you must copy the
map of your incoming XML data to a writeable folder before
using it. So, define a system environment variable
,FACTSET, to the path of your writeable folder containing
the fsdex01.map file and FSDEX01.xml.
To assign a fileref to the external file to be processed,
use the following form of the libname statement:
libname xfsd sasexfsd "%sysget(FACTSET)"
factlet=ExtractFormulaHistory
ids='ibm'
items='p_price'
dates='20110130:20111231:m'
format=sml
outXml=fsdex01
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdex01.map"
orientation=eti
user='<your FactSet username for internet FASTfetch access>'
pass='<your FactSet password for internet FASTfetch access>';
--------------------------------------------------------------------------*/
options validvarname=any
sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";
title 'Retrieve Price Data for IBM';
libname _all_ clear;
libname xfsd sasexfsd "%sysget(FACTSET)"
debug=on
factlet=ExtractFormulaHistory
ids='ibm'
items='p_price'
dates='20110130:20111231:m'
format=sml
outXml=fsdex01
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdex01.map"
orientation=eti
user='XXXXXXXXXXXXXXXX'
pass='XXXXXXXXXXXXXXXX';
data recentprice; set xfsd.fsdex01; run;
proc print data=recentprice; run;