In reply to Tim Simmons.

True. The most compact inline solution is probably logX = ifn(x>0, log(abs(x)), .), which results in a clean SAS Log that does not contain any notes about domain errors. However, the IF-THEN/ELSE statement is more efficient and easier to understand.