Hi, The code i am using for the email section is as follows: /*%macro execute; proc sql; select count('JobID'n) into :Count from WORK.Email; quit; %if &count>0 %then %do; %put execute further; %macro email(name=, EMAIL=, M=, CODE=, Id=, Total=,); filename mymail email from="" sender="" CC="" SUBJECT= "&Id" to=(&email); data _null_; file mymail; put //"Hello &NAME," /" " / "Please find below the total for &Id" /" " /"&total" /" " /"Thank you," /" " /""; run; %mend email; data _null_; set work.EMAIL; call execute('%email(name='||R||', email="'||Email||'", M='||M||', Id='||ID||', CODE='||code||', Total='||Total||')'); run; %end; %else %put exit; %mend; %execute; The email will then show the data as it is in the column: 1 - 2011 - 29FEB2016 | 1 - 2011 - 30NOV2015 | 1 - 2011 - 29MAY2015 | 1 - 2011 - 27FEB2015 |. The person the recieves the email will then copy this data and put it into a tool. However the tool requires each bit of data to be on seperate lines. Is there a way that when the code calls the &total it can seperate the different parts of data where i've put the '|'?
... View more