I have the following data step that I am executing. I only want to execute it if the variable PCTFREE is below 8 percent. I have echoed the contents of PCTFREE and it is currently resolving to a numeric character of 16. Part of the code does not execute however, the attachment is still honored and sent via email.
I do not want any of the code executed if condition is not met. Is this a bug or is this a bug in my coding?
DATA _NULL_;
SET VIRB;
IF PCTFREE < 8 THEN DO;
HEADING = 'THE PROD CDAM FILES ARE ONLY '||
TRIM(LEFT(PCTFREE))||' PERCENT FREE';
/****************************************************************************/
/* THIS PORTION SENDS AN EMAIL TO WARN OF LOW THRESHOLD */
/****************************************************************************/
FILE OUTBOX EMAIL
TO='
[email protected]'
SUBJECT='THE SUBJECT LINE SHOULD GET OVERWRITTEN BELOW'
TYPE='TEXT/HTML'
ATTACH=('MY.OUTPUT.HTML' NAME='MYREPORT' EXT='HTM');
PUT '!EM_SUBJECT!' HEADING;
PUT 'OUT OF A TOTAL OF ' TOTCYL ' CYLINDERS, ONLY ' FREECYL
' CYLINDERS REMAIN ';
END;
RUN;