Reading Standard Data with List Input

The Basics of List Input

Syntax, INPUT statement using list input:
INPUT variable <$>;
  • 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 Creditc, contains the results of a survey on the use of credit cards by males and females in the 18-39 age range.
Figure 18.2 Raw Data File Creditc
External file that contains free-format raw data in columns that are separated by blank spaces.
You need to read the data values for the following:
  • gender
  • age
  • number of bank credit cards ...

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.