Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

All Other Mainframe Topics :: RE: Reading data from PS file and send it as EMAIL body - SAS

$
0
0
Author: rajatbagga
Posted: Mon Oct 10, 2016 4:10 am (GMT 5.5)

vasanthz wrote:
Try this gimmicky code
Code:
//STEP1    EXEC SAS                                           
//IN1      DD *                                               
Hey I just met you                                             
And this is crazy                                             
But here s my number                                           
So call me maybe                                               
It s hard to look right at you baby                           
But here s my number                                           
So call me maybe                                               
/*                                                             
//SYSIN    DD   *                                             
FILENAME EMAIL EMAIL                                           
 FROM = ("vasanthz@trolland.com")                   
 TO = ("vasanthz@trolland.com")                     
 REPLYTO=("vasanthz@trolland.com")                 
 SUBJECT="SOME SAMPLE TEST REPORT"                             
 CONTENT_TYPE = "text/html"                                   
//         DD *                                               
     IMPORTANCE = "HIGH"                                       
//         DD *                                               
;                                                             
                                                               
data _null_;                                                   
file email;                                                   
infile in1 end=last;                                           
INPUT;                                                         
IF _N_ = 1 THEN DO;                                           
  put '<html>';                                               
  put '<head>';                                               
  put '<meta content="text/html; charset=ISO-8859-1"           
       http-equiv="content-type">';                           
  put '</head>';                                               
  put '<body>';                                               
  put '<b>';                                                   
  put '<span style="font-size: 12pt;';                         
  put 'font-family: &quot;Courier&quot;,&quot;serif&quot;;">';
END;                                                           
  put _INFILE_;                                               
  put '<br>';                                                 
IF LAST THEN DO;                                               
  put '</body>';     
  put '</html>';     
END;                 
run;                 
/*                   



Hello vasanthz, Thanks for the code, infact i tried a similar code already and it does changes the font size to 12pt and font to courier however the spaces are lost in the transition. Meaning i still get the same output even though the font is changed.. I don't know if it is possible to retain the spaces, it is just squeezing up all the spaces to 1 space.

Regards, Rajat

Output with your code:-

Code:
###############################################################
THE BATCH MILESTONES HAVE BEEN PROUDLY BROUGHT TO YOU BY: ##
########################################### ##
########################################### RAJAT BAGGA ##
########################################### ##
###############################################################


Regards, Rajat


Viewing all articles
Browse latest Browse all 9405

Trending Articles