SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Raw Data in Fixed Fields
Using Informats


Remember that the general form of the INPUT statement using formatted input is:


     INPUT pointer-control variable informat.;


An informat is the instruction that specifies how SAS software reads raw data. SAS software provides many informats for reading standard and nonstandard data values. Here is a small sample.


$ASCIIw. DATEw. NENGOw.
$BINARYw. DATETIMEw. PDw.d
$VARYINGw. HEXw. PERCENTw.
$w. JULIANw. TIMEw.
COMMAw.d MMDDYYw. w.d


Note that
  • Each informat contains a w value to indicate the width of the raw data field.

  • Each informat also contains a period, which is a required delimiter.

  • For some informats, the optional d value specifies the number of implied decimal places.

  • Informats for reading character data always begin with the dollar sign ($).

Hot Tip For quick access to a complete list of informats, select Help --> SAS System Help (see the index of informats and formats).



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement