FMTINFO Function

Retrieves information about a format or informat.

Category:Special
Restriction:This function is not valid on the CAS server.

Syntax

FMTINFO(fmtname, info)

Required Arguments

fmtname

specifies the format or informat name.

info

specifies the category, type, or description of the format or informat.

Note: You can specify only one info argument in your code.

CAT

specifies the category:

  • BIDI Text Handling
  • Character
  • Currency Conversion
  • Date and Time
  • DBCS
  • Hebrew Text Handling
  • ISO 8601
  • Numeric

TYPE

specifies the type of language element:

  • informat
  • format
  • both

DESC

specifies a short description of the format or informat.

MIND

specifies the minimum decimal value of the format or informat.

MAXD

specifies the maximum decimal value of the format or informat.

DEFD

specifies the default decimal value of the format or informat.

MINW

specifies the minimum width value of the format or informat.

MAXW

specifies the maximum width value of the format or informat.

DEFW

specifies the default width value of the format or informat.

Details

The FMTINFO function retrieves information about a format or informat. You can retrieve information about a format or informat’s category, the type of language element (format, informat, or both), a description of the language element, and the minimum, maximum, and default decimal and width values.
You cannot specify multiple arguments with the FMTINFO function. You can specify only one of these arguments: CAT, TYPE, DESC, MIND, MAXD, DEFD, MINW, MAXW, and DEFW. For example,
a=fmtinfo('best','cat');
is valid because you specify only one argument, the category argument cat.
You must enclose the arguments with apostrophes unless you are passing a character variable name.
The FMTINFO function returns a character string for all data values, including these numeric value arguments: MIND, MAXD, DEFD, MINW, MAXW, and DEFW.

Example

The following examples retrieve information about the BEST format.
Statement
Result
data;
a=fmtinfo('best','cat');
put a=;
run;
a=num
data;
a=fmtinfo('best','type');
put a=;
run;
a=both
data;
a=fmtinfo('best','desc');
put a=;
run;
a=SAS System chooses best notation
Last updated: March 16, 2017