I would recommend separating your steps. First read the data in. Make sure that is working correctly and then do your cleaning in a second step. This allows you to test each stage separately and more easily identify errors. As BallardW indicated, the variable, dblehdr, is never read in or exists prior to usage so that will not work. data trp2; infile trpd2 DLM=',' DSD Firstobs=2 missover; input Year Date :$12. Game IAT Team :$12. LG $ HA $ oppteam :$12. OLG $ players :$150. inn $ SCRVH $ batter :$20. runner1 :$20. runner2 :$20. runner3 :$20.; run; data trp3; set trp2; if Date='' then delete; if dblehdr= indexc(Date,'()') then dblehdr=1; run;
... View more