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

Overview

List input is a powerful tool for reading both standard and nonstandard free-format data.
General form, INPUT statement using list input:
INPUT variable <$>;
where
  • variable specifies the variable whose value the INPUT statement is to read
  • $ specifies that the variable is a character variable.
Suppose you have an external data file like the one shown below. The file, which is referenced by the fileref Credit, contains the results of a survey on the use of credit cards by males and females in the 18-39 age range.
Raw Data File Creditcard
External file that contains free-format raw data in columns that are separated by blank spaces.
You need to read the data values for
  • gender

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