I tried to separate the conditional logic and the e-mail sending step into different data steps using a call execute macro call, and I think I got the behavior that you desired:
DATA _NULL_;
SET VIRB;
IF age LT 12 THEN DO;
HEADING = 'THE AGE ARE ONLY '||
TRIM(LEFT(PCTFREE ))||' !!!';
call execute('%EMAIL('||heading||','||freecyl||','||totcyl||');');
END;
RUN;
%macro email(heading,freecyl,totcyl);
data _null_;
FILE OUTBOX EMAIL
TO='JOHNDOE@MYEMAIL.COM'
SUBJECT='THE SUBJECT LINE SHOULD GET OVERWRITTEN BELOW'
TYPE='HTML'
ATTACH=('MY.OUTPUT.HTML' NAME='MYREPORT' EXT='TXT');
PUT "!EM_SUBJECT! &HEADING.";
PUT "OUT OF A TOTAL OF &TOTCYL CYLINDERS, ONLY &FREECYL CYLINDERS REMAIN ";
run;
%mend email;
Hope this helps,
Linus
Data never sleeps