Problem Solving: When an Input Record Unexpectedly Does Not Have Enough Values

Understanding the Default Behavior

When a DATA step reads raw data from an external file, problems can occur when SAS encounters the end of an input line before reading in data for all variables specified in the input statement. This problem can occur when reading variable-length records, records containing missing values, or both.
The following is an example of an external file that contains variable-length records:

This DATA step uses the numeric informat 5. to read a single field in each record of raw data and to assign values to the variable TestNumber:
data numbers; infile 'your-external-file'; input TestNumber 5.; run; ...

Get Step-by-Step Programming with Base SAS 9.4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.