Specifying the Length of Character Variables

The Basics of Specifying Length

Remember that when you use list input to read raw data, character variables are assigned a default length of 8. In this example, see what happens when list input is used to read character variables whose values are longer than 8.
The raw data file referenced by the fileref Citydata contains 2000 and 2010 population figures for several large U.S. cities. Notice that some city names are rather long.
Figure 18.6 Raw Data File with Character Values That Are Longer Than 8
Raw data that shows character variables whose values are longer than 8.
The longer character values are truncated when they are read into the program data vector.

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.