* change the portion after datafile if you have placed the programs and data files; * in a different location; filename datafile 'e:\decision\risk.txt'; * can_rd.sas; * read in Sclerotinia blight predictor; options linesize=80; data riskset; infile datafile lrecl=200 firstobs=2 delimiter='09'x missover; input nr year omr $ raps $ qual $ angr nyr $ p_inf $ peas $ foliage $ june $ rain2 $ forec $ apo_r $ tidan aponum ; if nyr = 'a' then nyr = 'b'; * number of years 1-4 years highest risk group; if p_inf = 'd' then p_inf='z'; *make 0 last time reference prev inf; if apo_r = 'a' then apo_r='b'; *condense ref group to 0-5 apothecia; angr2 = angr*2; if angr > 20 then need = 1; else need = 0; at_risk=1; run;