The DELETE statement does not allow any other text. That is why SAS says you are missing a semicolon. Your text looks like it was meant to be two statements. A DELETE statement and subsetting IF statement.
delete;
if RENTGRS=0;
But that would delete every observation.
If you want to conditionally execute the DELETE statement then you can use an IF/THEN statement and code the DELETE statement as the statement to execute when the condition is true.
if RENTGRS=0 then delete;
If instead you want to use a subsetting IF statement you will need to reverse the logic of condition since now you want to specify the condition for when to NOT delete the observation.
if RENTGRS ne 0;
... View more