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

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

$
0
0
Author: rajatbagga
Subject: Reading data from PS file and send it as EMAIL body - SAS
Posted: Fri Sep 23, 2016 12:51 pm (GMT 5.5)

Hello,

I am trying the read the data from the file IN1 and want to put it as it is in the email body and email it via SAS. I am using the JCL below but I am not getting the email body data in the same format, However i am getting the email.


Code:
//STEP1    EXEC SAS                                                 
//IN1      DD *                                                     
    ###############################################################
    THE BATCH MILESTONES HAVE BEEN PROUDLY BROUGHT TO YOU BY:    ##
    ###########################################                  ##
    ########################################### RAJAT BAGGA      ##
    ###########################################                  ##
    ###############################################################
/*                                                                 
//SYSIN    DD *                                                     
 FILENAME MAIL EMAIL                                               
     FROM = "BATCH MILESTONE REPORT <RAJAT.BAGGA@EMAIL.COM>"       
       TO = "RAJAT.X.BAGGA@EMAIL.COM"                             
  SUBJECT = "TEST EMAIL FROM SAS"                                   
  CONTENT_TYPE = "TEXT/HTML"                                       
//         DD *                                                     
    IMPORTANCE = "HIGH"                                             
//         DD *                                                     
;                                                                   
 DATA MLREP; INFILE IN1;                                           
  INPUT @1 LINE_DATA $CHAR80.;                                     
                                                                   
 RUN;                                                               
                                                                   
 DATA _NULL_;                                                       
  FILE MAIL;                                                       
  INFILE IN1;                                                       
  INPUT;                                                           
  PUT _INFILE_;                                                     
 RUN;                                                               
                                                                   
/*                                                                 


Present output (email body)
Code:

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



Expected output should as in the instream :-


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



Please assist.

Regards,
Rajat


Viewing all articles
Browse latest Browse all 8500