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 ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.