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

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.