Retrieving Items Using SPEC_ID
/*----------------------------------------------------------------
SAS SAMPLE LIBRARY
Name: fsdecon17.sas
Description: Example program from SAS/ETS User's Guide,
The SASEXFSD Interface Engine
Title: Retrieving Items Using SPEC_ID
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 Windows system environment variable
,FACTSET, to the path of your writeable folder containing
the fsdecon17.map file and FSDECON17.xml file.
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=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='<your FactSet username for internet FASTfetch access>'
pass='<your FactSet password for internet FASTfetch access>';
----------------------------------------------------------------*/
option validvarname=any;
title 'Retrieve Monthly Data from Two Dbsources: 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;