Your ELSE is not correct. Try this:
libname adeno '/home/u58566978/adeno';
/*These next three lines not relevant to this problem, so I have commented them out */
/*data work.adeno1;*/
/*set adeno.finch_gjred;*/
/*run;*/
data work.adeno1;
set adeno.finch_gjred;
if beertotl=2 and beerfrq2=0 and beerfrqx2=0 and beernum2=98 then wrong=0;
else if beertotl=3 and beerfrq3=0 and beerfrqx3=0 and beernum3=98 then wrong=0;
else if beertotl=4 and beerfrq4=0 and beerfrqx4=0 and beernum4=98 then wrong=0;
else if beertotl=5 and beerfrq5=0 and beerfrqx5=0 and beernum5=98 then wrong=0;
else if beertotl=6 and beerfrq6=0 and beerfrqx6=0 and beernum6=98 then wrong=0;
else if beertotl=7 and beerfrq7=0 and beerfrqx7=0 and beernum7=98 then wrong=0;
else if beertotl=8 and beerfrq8=0 and beerfrqx8=0 and beernum8=98 then wrong=0;
else if beertotl=9 and beerfrq9=0 and beerfrqx9=0 and beernum9=98 then wrong=0;
else if beertotl=10 and beerfrq10=0 and beerfrqx10=0 and beernum10=98 then wrong=0;
else if beertotl=11 and beerfrq11=0 and beerfrqx11=0 and beernum11=98 then wrong=0;
else if beertotl=12 and beerfrq12=0 and beerfrqx12=0 and beernum12=98 then wrong=0;
else wrong=1;
run;
proc freq data=work.adeno1;
tables wrong;
run;
You might also benefit from properly indenting your code, as I have done above.
... View more