Loading...

SAS INFORMATS AND FORMATS



Informats are typically used to read or input data from external files called flat files (text files, ASCII files, or sequential files) whereas formats are used for outputting data. The informat instructs SAS on how to read data into SAS variables while formats define format to output data to external files/datasets/log.

SAS informats/formats are typically grouped into three categories: character, numeric, and date/time. These are named according to the following syntax structure:

• Character Informats: $INFORMAT/FORMATw.
  E.g. $CHAR6.
• Numeric Informats: INFORMAT/FORMATw.d
  E.g. 8.2
• Date/Time Informats: INFORMAT/FORMATw.
  E.g. DATE9.

The $ indicates a character informat/format. INFORMAT/FORMAT refers to the sometimes optional

SAS informat/format name. The w indicates the width (bytes or number of columns) of the variable. The d is used for numeric data to specify the number of digits to the right of the decimal place. All informats/format must contain a decimal point (.) so that SAS can differentiate it from a SAS variable
Following table will illustrate various ways to use Informats and Formats in SAS –



Informats and Formats of SAS


VirtualNuggets 7189325926004310168

Post a Comment

emo-but-icon

Home item

Blog Archive

Popular Posts

Random Posts

Flickr Photo