Representing Missing Values
Recognizing Default Values
In the following example, numeric data for male verbal
and math scores is missing for 1972. Character data for gender is
missing for math scores in 1975. By default, SAS replaces a missing
numeric value with a period, and a missing character value with a
blank when it creates the data set.
libname admin 'SAS-data-library'; data admin.sat_scores2; input Test $ 1-8 Gender $ 10 Year 12-15 SATscore 17-19; datalines; verbal m 1972 . verbal f 1972 529 verbal m 1975 515 verbal f 1975 509 math m 1972 . math f 1972 489 math 1975 518 math 1975 479 ; run; ods html close; ods listing; options pagesize=60 linesize=80 pageno=1 nodate; proc print data=admin.sat_scores2; title 'SAT Scores for Years 1972 ...
Get Step-by-Step Programming with Base SAS 9.4 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.