O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required