O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Informats

Overview

Remember that the general form of the INPUT statement for formatted input is:
INPUT <pointer-control> variable informat.;
An informat is an instruction that tells SAS how to read raw data. SAS provides many informats for reading standard and nonstandard data values. Here is a small sample.
Selected Informats for Reading Data
PERCENTw.d
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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required