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 Formatted Input

The General Form of Formatted Input

Formatted input is a very powerful method for reading both standard and nonstandard data in fixed fields.
General form, INPUT statement using formatted input:
INPUT <pointer-control> variable informat.;
where
  • pointer-control positions the input pointer on a specified column
  • variable is the name of the variable
  • informat is the special instruction that specifies how SAS reads the raw data.
In this chapter, you'll work with two column pointer controls.
  • The @n moves the input pointer to a specific column number.
  • The +n moves the input pointer forward to a column number that is relative to the current position.
Let's first look at the @n column ...

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