View previous topic :: View next topic |
Author |
Message |
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Mon Sep 15, 2014 10:14 am Post subject: How to dynamically override text in email sending utility |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Sep 15, 2014 11:15 am Post subject: |
|
|
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 |
|
|
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Mon Sep 15, 2014 3:58 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Sep 15, 2014 4:11 pm Post subject: |
|
|
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 |
|
|
|
|