FMTSEARCH= System Option

Specifies the order in which format catalogs are searched.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Environment control: Files
PROC OPTIONS GROUP= ENVFILES
Requirement: Catalog specifications must be separated by a space.
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.
Tip: You can use the APPEND or INSERT system options to add additional catalog-specification.

Syntax

Syntax Description

catalog-specification
searches format catalogs in the order listed, until the desired member is found.
The value of catalog-specification can be one of the following:
libref</LOCALE>
specifies to search the FORMATS catalog in the storage location that is specified by libref. When a libref is specified without a catalog, SAS uses FORMATS as the default catalog name.
If you specify /LOCALE, SAS searches for a catalog that is associated with the current SAS locale before it searches the FORMATS catalog. The locale catalog name is based on the POSIX locale name for the current locale. Two catalogs might exist for each POSIX locale name: one catalog for the language and one catalog for the language_country. If your current SAS locale is English_India, the POSIX locale name is en_IN. The two possible locale catalogs are libref.FORMATS_en and libref.FORMATS _en_IN. SAS searches, in order, these catalogs in libref:
  1. libref.FORMATS_language_country
  2. libref.FORMATS_language
  3. libref.FORMATS
Tip:You can obtain a POSIX locale value by using the GETPXLOCALE function. You can use the GETLOCENV function to obtain the current SAS locale. For more information, see SAS National Language Support (NLS): Reference Guide.
See:For a list of POSIX locale values and their corresponding SAS locale names, see LOCALE= Values and Default Settings for ENCODING, PAPERSIZE, DFLANG, and DATESTYLE Options in SAS National Language Support (NLS): Reference Guide.
libref.catalog</LOCALE>
specifies to search for a specific library and catalog.
If you specify /LOCALE, SAS searches libref.catalog for a catalog that is associated with the current SAS locale. The locale catalog name is based on the POSIX locale name for the current locale. Two catalogs might exist for each POSIX locale name: one catalog for the language and one catalog for the language_country. If your current SAS locale is English_India, the POSIX locale name is en_IN. The two possible locale catalogs are libref.catalog_en and libref.catalog_en_IN.
SAS searches, in order, these catalogs in libref, if you specify /LOCALE:
  1. libref.catalog_language_country
  2. libref.catalog_language
  3. libref.catalog
Tip:You can obtain a POSIX locale value by using the GETPXLOCALE function. You can use the GETLOCENV function to obtain the current SAS locale. For more information, see SAS National Language Support (NLS): Reference Guide.
See:For a list of POSIX locale values and their corresponding SAS locale names, see LOCALE= Values and Default Settings for ENCODING, PAPERSIZE, DFLANG, and DATESTYLE Options in SAS National Language Support (NLS): Reference Guide.

Details

The default value for FMTSEARCH is (WORK LIBRARY). The catalogs WORK.FORMATS and LIBRARY.FORMATS are always searched, whether or not they appear in the search list. The WORK.FORMATS catalog is always searched first, and the LIBRARY.FORMATS catalog is searched next, unless one of the catalogs appears in the FMTSEARCH= list.
For example, FMTSEARCH=(MYLIB LIBRARY) results in searching these catalogs, in the order MYLIB.FORMATS, LIBRARY.FORMATS, and WORK.FORMATS.
If a catalog appears in the FMTSEARCH= list, the catalog is searched in the order in which it appears in the list. If a catalog in the list does not exist, that particular catalog is ignored and searching continues.

Examples

Example 1: Format Catalog Search Order with Default Libraries Searched First

If you specify FMTSEARCH=(ABC DEF.XYZ GHI), SAS searches for requested formats or informats in this order:
  1. WORK.FORMATS
  2. LIBRARY.FORMATS
  3. ABC.FORMATS
  4. DEF.XYZ
  5. GHI.FORMATS.

Example 2: Format Catalog Search Order with Default Libraries Searched Last

If you specify FMTSEARCH=(ABC WORK LIBRARY) SAS searches in this order:
  1. ABC.FORMATS
  2. WORK.FORMATS
  3. LIBRARY.FORMATS.
Because WORK appears in the FMTSEARCH list, WORK.FORMATS is not automatically searched first.

Example 3: Format Catalog Search Order with POSIX Locale Values

If you specify FMTSEARCH=(ABC/LOCALE) and the current locale is German_Germany, SAS searches in this order:
  1. WORK.FORMATS
  2. LIBRARY.FORMATS
  3. ABC.FORMATS_de_DE
  4. ABC.FORMATS_de
  5. ABC.FORMATS

See Also

Procedures:
FORMAT Procedure in Base SAS Procedures Guide