Something like below should return the same result.
proc sql;
create table want as
select
case
when dx_mo="99" then "07"
else dx_mo
end
as dx_mo,
case
when dx_mo="99" then "01"
when dx_dy="99" then "15"
else dx_dy
end
as dx_dy
from have
;
quit;
With the sample data you've posted you'll get in the data step the following warning:
NOTE: Character values have been converted to numeric values
You'll observe that SQL is less tolerant here and that you need to provide the correct data types.