Hi:
When you use < or > symbols in your code, it confuses the forum posting software. So the "fix" is to use < for the < symbol and > for the > symbol or to post your code with LT, LE, GT, GE logical operators.
This previous forum posting is very helpful in explaining other things that you can do to help your postings look better and be more readable:
http://support.sas.com/forums/thread.jspa?messageID=27609毙
Meanwhile, I believe this is the code you wanted to post:
[pre]
DATA libcan.can; if id LE 4 then FILE outmail1;
PUT "CONDITION 1 !!!";
else
FILE outmail2;
PUT "CONDITION 2 !!!";
RUN;
[/pre]
Note that I changed <= to LE in the above code. I see that you do not have a SET statement in your program, so I find myself wondering how the test for ID will work out???? Generally, when you write output with a PUT statement, you are writing to FILE PRINT. You do not have as much control over the font characteristics of the output as you would in a PROC PRINT or a PROC REPORT. Although you could define color coding for a data step program, by using a custom TABLE template or writing the text with their own HTML tags or possibly using STYLE= overrides, if your mail system is set to PLAIN TEXT, there is really nothing you can do to override what the mail system format is - -from inside SAS. You have to play by the rules of the mail system you are using.
IF your mail system allows HTML content and IF you put HTML tags into your PUT statements you might be able to alter the color as you want. But those are 2 big IFs...and even if you SEND HTML e-mail content -- the receiving e-mail system has to allow HTML email content, too. You might want to check with the documentation or Tech Support -- I believe you have to change the content-type for the email engine if you want to send HTML. And, of course, you have to check with your mail administrators to see what they will allow.
cynthia