Using Formatted Input

INPUT Statement Syntax

Formatted input is a powerful method for reading both standard and nonstandard data in fixed fields.
Syntax, INPUT statement using formatted input:
INPUT <pointer-control> variable informat.;
  • 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.

Using the @n Column Pointer Control

The @n is a pointer control that moves the input pointer to a specific column number. The @ moves the pointer to column n, which is the first column of the field that is being read.
Syntax, INPUT statement using formatted input and the @n pointer control: ...

Get SAS Certification Prep Guide, 4th 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.