The SASEXFSD Interface Engine

The LIBNAME libref SASEXFSD Statement

  • LIBNAME libref SASEXFSD 'physical-name' FACTLET=fact_factletname options;

The LIBNAME statement assigns a SAS library reference (libref) to the physical path of the directory of FactSet data files where the downloaded FactSet XML data are stored. Because the required 'physical name' argument specifies the location of the folder where your FactSet XML data reside, it should end in a backslash if you are in a Windows environment and a forward slash if you are in a UNIX environment.

FACTLET=fact_factletname specifies the FactSet factlet that you want to use to download your data. Choose one factlet from these possible values: ExtractEconData, ExtractFormulaHistory, ExtractDataSnapshot, ExtractBenchmarkDetail, ExtractOFDBItem, ExtractOFDBUniverse, and ExtractScreenUniverse. (See Table 44.1.)

For example, the following statements access the FactSet database for daily dividend yield data for IBM:

   LIBNAME myLib SASEXFSD 'physical-name' FACTLET==ExtractFormulaHistory 

After the libref is assigned, you can access the data items for the IDs (keys) from the requested factlet.

You can specify the following options in the LIBNAME libref SASEXFSD statement.


Each factlet type has its own set of parameters (shown in Table 44.5 in the Factlet Options Table column), allowing flexibility and easy access to FactSet data. For more details about each factlet, refer first to the Factlet Description Section listed in Table 44.5. If you need more information, refer to the Online Assistant, page ID 16948. If the factlet is not listed on that page, then enter the factlet name in the search window of the Online Assistant to retrieve additional information about using the factlet.

Table 44.5: Summary of Factlet Options

Factlet Name

Factlet Description Section

Factlet Options Table


The ExtractEconData Factlet

Table 44.10


The ExtractFormulaHistory Factlet

Table 44.12


The ExtractDataSnapshot Factlet

Table 44.13


The ExtractBenchmarkDetail Factlet

Table 44.15


The ExtractOFDBItem Factlet

Table 44.16


The ExtractOFDBUniverse Factlet

Table 44.17


The ExtractScreenUniverse Factlet

Table 44.18


specifies a list of FactSet IDs (entity identifiers or keys) for accessing FactSet OnDemand data. To select more than one ID, list the unique entity identifiers, separated by commas (as shown in the following statements). Examples of FactSet IDs include CUSIPs, tickers, SEDOLs, Quick Code, and CINS (CUSIP International Numbering System). For more information, see Example 44.6 and Example 44.7.

   LIBNAME myLib sasexfsd 'physical-name' 

specifies the items and groups of interest for selection based on IDs (keys). Use FactSet’s Formula Lookup for a complete list of data items, which is described in the FactSet Online Assistant.

Because the availability of data libraries and their contents are constantly changing, the following tables are included for instructional purposes only. Many other databases are available that are not shown in Table 44.6 to Table 44.9.

Table 44.6: Some FactSet Data Items

Data Source

Table Reference

Online Assistant Page ID

FactSet Fundamentals Data Items

Table 44.7

Page ID 15099

FactSet Global Formula Library

Also see Online Assistant Sidebar

Page IDs 13299, 16664

FactSet Global Indices Formulas

Table 44.8

Page ID 14336

Global Constituents Formulas

Table 44.9

Page ID 15086

Table 44.7: Some FactSet Fundamentals Data Items

Data Source

Online Assistant Page ID

Consolidated Items (FF_)

Page ID 16331

Debt Capital Structure

Page ID 16235

Enhancements to Legacy Formulas

Page ID 16248

Annual Items (FA_)


Balance Sheet

Page ID 15120

Income Statement

Page ID 15121

Funds Flow Statement

Page ID 15122

Financial Ratios

Page ID 15123

Per Share and Valuation

Page ID 15124

Multiple Share Information

Page ID 15125

Accounting Policies and Methods

Page ID 15126

Segment Data

Page ID 15127

Monthly Items (FM_)


Monthly Data

Page ID 15128

Table 44.8: FactSet Global Indices Formulas

Data Source

Online Assistant Page ID

Using FG Indices Formulas

Page ID 14337

Database Descriptions for Global Indices

Page ID 14338

Table 44.9: Global Constituents Formulas

Global Constituents Formula


Benchmark Constituent Classification


Benchmark Constituent Country


Benchmark Constituent Currency


Benchmark Constituent Date


Benchmark Constituent Float Factor


Benchmark Constituent Identifier


Benchmark Constituent Latest Update


Benchmark Constituent Market Value


Benchmark Constituent Name


Benchmark Constituent Price


Benchmark Constituent Shares


Benchmark Constituent Style Factor


Benchmark Constituent Total Return - 1 Day


Benchmark Constituent Valuation


Benchmark Constituent Weights


Benchmark Constituents


For more information, see the FactSet Online Assistant, page ID 1931. To see each data source’s list of available data items, use the search feature of the FactSet Online Assistant. You can open any page in the FactSet Online Assistant by entering the appropriate page ID number in the page ID window, which is located below the search window.


specifies the start date, end date, and frequency, separated by colons (:). For more information, see the section Specifying Date Ranges and Frequency Codes. An alternative to using the DATES= option is to use the START=, END=, and FREQ= options.


specifies the periodic frequencies of the actual data points (observations) in a time series. The valid period parameters are ANN, QTR, SEMI, MON, YTD, YTD_SEMI, LTM, LTM_SEMI, and SEMI-ANN. The default is ANN.


specifies the filename of the data file where the XML data that are returned from the FactSet OnDemand service are stored. You can use the OUTXML= option to name your XML data file, which is placed in the folder designated by ‘physical-name’, as shown in the section The LIBNAME libref SASEXFSD Statement.


specifies whether to overwrite the existing XML map file (AUTOMAP=REPLACE) or whether not to overwrite the existing XML map file (AUTOMAP=REUSE). You can set fact_automap to REUSE so that a pre-existing XML map named by the XMLMAP= option is used. You can set fact_automap to REPLACE so that the most current XML map generated by the SASEXFSD engine and named by the XMLMAP= option is used.


specifies the fully qualified name of the file where the XML map is automatically stored.


specifies the fileref to be used for the map assignment.

You can use the MAPREF= and XMLMAP= options to control where the map resides, what you name the map, and how you refer to it with a fileref. You can use the OUTXML= option to name your XML data file. This file is placed in the folder designated by ‘physical-name’, and you can reference it by using the myLib libref in your SASEXFSD LIBNAME statement. This is shown in the section Getting Started: SASEXFSD Interface Engine. The following filename statement is generated by the SASEXFSD interface engine by using the fileref, MyMap, from the MAPREF=MyMap option and from the fully designated filename in the XMLMAP= option:

   FILENAME MyMap "U:\factset\test\"; 

specifies the SAS XML (SML) format, which is the only format that the SASEXFSD engine supports.


specifies the ETI orientation, which is the only orientation that the SASEXFSD engine supports. The ETI orientation means that the data are returned and stored in entity-time-item logical layout.


specifies the FactSet user name that enables you to access the data provided by the FactSet OnDemand service.


specifies the password that is paired with the user name to enable you to access the data provided by the FactSet OnDemand service. Note: These FactSet OnDemand user name and password credentials are different from your FactSet workstation login credentials. A FactSet representative can provide these credentials.