Specifying the Length of Character Variables

Overview

Remember that when you use list input to read raw data, character variables are assigned a default length of 8. Let's 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 1970 and 1980 population figures for several large U.S. cities. Notice that some city names are rather long.
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.
Program Data Vector
PROC PRINT output shows the ...

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.