Search code examples
emailsascarriage-return

formatting SAS e-mailing with carriage return


I am trying to output a carriage return with the PUT command, but I cannot do it. Here is an example of my e-mail code at the moment.

data _null_;
     file tmp;
     put "Hello, \n \n";
     put "This is a test of carriage return.";
run;

Filename tmp Email
Subject="SAS email"
To = ("myself@website.com")
CT = "text/html";

However, the received email looks like this:

Hello, \n \n This is a test of carriage return.


Solution

  • You can use a forward slash for this:

    data _null_;
         put "Hello," / /;
         put "This is a test of carriage return.";
    run;
    

    Documented here, under the forward slash line pointer control.