Retrieving Benchmark Data
/*----------------------------------------------------------------
SAS SAMPLE LIBRARY
Name: fsdex13.sas
Description: Example program from SAS/ETS User's Guide,
The SASEXFSD Interface Engine
Title: Retrieving Benchmark Data
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 fsdex13.map file and FSDEX13.xml.
To assign a fileref to the external file to be processed,
use the following form of the libname statement:
libname fsd sasexfsd "%sysget(FACTSET)"
factlet=ExtractBenchmarkDetail
ids='r.1000'
items='p_price'
dates='20120118:20120113:b'
matchDate=on
format=sml
outXml=fsdex13
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdex13.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 Benchmark Data for R.1000 with MATCHDATE=ON';
libname _all_ clear;
libname fsd sasexfsd "%sysget(FACTSET)"
debug=on
factlet=ExtractBenchmarkDetail
ids='r.1000'
items='p_price'
dates='20120118:20120113:b'
matchDate=on
format=sml
outXml=fsdex13
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdex13.map"
orientation=eti
user='XXXXXXXXXXXXXXXX'
pass='XXXXXXXXXXXXXXXX';
data benchmatch;
set fsd.fsdex13;
run;
proc print
data=benchmatch(firstobs=1 obs=50);
run;