Q. Write the data step that creates a variable that should have the number of animals that are 200 kg or heavier than 200 kg. My Ans - This code is not giving me desired results. Any modification on what is the issue ASAP will be of great help. data animal_weight; input animals $ weight; datalines; dog 19 cat 14 mice 0.25 camel 575 pigeon 0.57 cow 475 goat 18 fish 4 horse 450 donkey 330 monkey 23 lion 580 rat 0.69 rabbit 2.5 Pig 235 crow 1.8 ; run; data sum; set animal_weight; count=0; array animl(*)_numeric_; do i = 1 to 16; if animl(i) >= 200 then count + animl(i); proc print data=sum; end; run; quit;
... View more