DATA Description
We have 50 Numeric variables(Var1-Var50) and 40 Character Variables(Char1-Char40) in a SAS Data set. Out of 50 Numeric variables Var1-Var35 has missing numeric values(Period or Dot) and Char1-Char10 has missing Character values(Blank).
TASK
We have to replace All the Missing Numeric Values with 0(zero) but only in Var1-Var35 and All the Missing Character Values with "Missing" word. We should not effect the missing Values of Var36-Var50 and Char11-Char40.
Then we have to import the data in Excel.
I am expecting most efficient program as this task can be done in many ways.
Now prepare your Base SAS and
Advance SAS Certification Exams with Online Mock tests: http://exam.sankhyana.com
For training related info kindly mail us at info@sankhyana.com
www.sankhyana.com
We have 50 Numeric variables(Var1-Var50) and 40 Character Variables(Char1-Char40) in a SAS Data set. Out of 50 Numeric variables Var1-Var35 has missing numeric values(Period or Dot) and Char1-Char10 has missing Character values(Blank).
TASK
We have to replace All the Missing Numeric Values with 0(zero) but only in Var1-Var35 and All the Missing Character Values with "Missing" word. We should not effect the missing Values of Var36-Var50 and Char11-Char40.
Then we have to import the data in Excel.
I am expecting most efficient program as this task can be done in many ways.
Now prepare your Base SAS and
Advance SAS Certification Exams with Online Mock tests: http://exam.sankhyana.com
For training related info kindly mail us at info@sankhyana.com
www.sankhyana.com
data test;
ReplyDeleteset test;
array nvar(*) _numeric_;
array cvar(*) _character_;
do i = 1 to 35 ;
nvar(i) = 0;
end;
do i = 11 to 20 ;
cvar(i) = 'Missing';
end;
drop i;
run;