MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to dynamically override text in email sending utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Mon Sep 15, 2014 10:14 am    Post subject: How to dynamically override text in email sending utility Reply with quote

I have to send email with count of records processed in email body....any idea how to override count dynamically each time while sending email...since the letter body text will be static.
_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Sep 15, 2014 11:15 am    Post subject: Reply with quote

javedsk12,

Quite simple. Use the following JCL

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
ABC                                                         
ABC                                                         
ABC                                                         
ABC                                                         
ABC                                                         
ABC                                                         
//SORTOUT  DD DSN=&&C,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)   
//SYSIN    DD *                                             
  OPTION COPY                                               
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                     
  TRAILER1=(' THE TOTAL NUMBER OF RECORDS  ARE : ',COUNT)   
//*                                                         
//STEP0200 EXEC PGM=IEBGENER                                 
//SYSIN    DD DUMMY                                         
//SYSPRINT DD SYSOUT=*                                       
//SYSUT2   DD SYSOUT=(A,SMTP)                               
//SYSUT1   DD *                                             
HELO SYSA                                                   
MAIL FROM:<KOLUSU@MVSFORUMS.COM>                             
RCPT TO:<SOMEBODY@DOMAIN.COM>                               
DATA                                                         
FROM:      <KOLUSU@MVSFORUMS.COM>                           
TO:         SOMEBODY@DOMAIN.COM                             
SUBJECT:  FILE COUNTS FROM MAINFRAME                         
                                                             
//         DD DSN=&&C,DISP=SHR                               
//         DD *                                             
QUIT                                                         
//*         

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Mon Sep 15, 2014 3:58 pm    Post subject: Reply with quote

Thanks Kolusu...i forgot to mention in my eariler post that my shop uses SAS to send email...do u have a sample piece of code/command for SAS ?
_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Sep 15, 2014 4:11 pm    Post subject: Reply with quote

javedsk12 wrote:
Thanks Kolusu...i forgot to mention in my eariler post that my shop uses SAS to send email...do u have a sample piece of code/command for SAS ?


Javedsk12,

huh? SAS might be building the body of the email and submitting it to SMTP. Change your SAS program to read the dataset and write out the count. It is a simple task. You already have an existing program which builds the mail contents. Now all you need is to add count part which is quite easy.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group