Retrieving Items Using Economic Function ZSCORE
/*----------------------------------------------------------------
SAS SAMPLE LIBRARY
Name: fsdex8z.sas
Description: Example program from SAS/ETS User's Guide,
The SASEXFSD Interface Engine
Title: Retrieving Items Using Economic Function ZSCORE
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 fsdecon8z.map file and FSDECON8Z.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="ECON_EXPR_DATA('ZSCORE(FDS_ECON[GRLM0347861],-5AY,step,average)',0,0/0/-3,m)"
format=sml
outXml=fsdecon8z
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdecon8z.map"
orientation=eti
user='<your FactSet username for internet FASTfetch access>'
pass='<your FactSet password for internet FASTfetch access>';
----------------------------------------------------------------*/
option validvarname=any
sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";
title 'Retrieve the Z Score Using ECON_EXPR_DATA for the US CFTNCLOI%ALLNQ100CMEF Series';
libname _all_ clear;
libname xfsd sasexfsd "%sysget(FACTSET)"
debug=on
factlet=ExtractEconData
items="ECON_EXPR_DATA('ZSCORE(FDS_ECON[GRLM0347861],
-5AY,step,average)',0,0/0/-3,m)"
format=sml
outXml=fsdecon8z
automap=replace
mapref=MyMap
xmlmap="%sysget(FACTSET)fsdecon8z.map"
orientation=eti
user='XXXXXXXXXXXXXXXX'
pass='XXXXXXXXXXXXXXXX';
data FQLeconFunc; set xfsd.fsdecon8z; run;
proc print data=FQLeconFunc(firstobs=1 obs=34) label; run;