The following raw data records contain the age of each individual customer. A value of 999 was used to represent a missing age value. Write an instream DATA step that will read the records and replace the value 999 with a period '.'
18 30 25 999 42 36 999
data ex18; input age @@; if age=999 then (I don't know what to put here); datalines; 18 30 25 999 42 36 999 ; run;
A dot is how SAS prints by default a missing value for a numerical variable. You can also use a dot in SAS syntax to assign missing to a SAS numerical variable.
data ex18;
input age @@;
/*if age=999 then (I don't know what to put here);*/
if age=999 then age=.;
datalines;
18 30 25 999 42 36 999
;
run;
A dot is how SAS prints by default a missing value for a numerical variable. You can also use a dot in SAS syntax to assign missing to a SAS numerical variable.
data ex18;
input age @@;
/*if age=999 then (I don't know what to put here);*/
if age=999 then age=.;
datalines;
18 30 25 999 42 36 999
;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!