Informats are used to read in data that does not conform to the default SAS length restrictions. Informats are available for character, numeric, and other data forms. Example:
input name :$15. age income;
Here the informat of the form :$w. (trailing period
required) tells SAS to read characters up to the first blank and assign
the first w of these characters as the value of the
variable. Here the first 15 characters will be assigned to the variable
name. The default informat is equivalent to
:$8. and w must be between 1 and 200.
The informat &$w. reads characters up to the first occurance of 2
successive blanks and assigns the first w of these characters as
the value of the variable. This informat is useful values of character
variables have single embedded blanks. The width w must be
between 1 and 200.
The informat w. is used to read in numeric data with w digits.
This informat is most often used with column input.
The informat date7. reads dates of the form 02MAR93. The
informat mmddyy8. reads dates of the form 03-02-93.
There are many other SAS informats available which are useful for processing dates and other specialized situations. See the SAS Language Reference for additional information.
Copyright © 1997 by Jerry Alan Veeh. All rights reserved.