Sending multiple emails thru one SMTP step

5 pts.
Tags:
Data File Utility
JCL
SMTP
SMTP Email Address
Hi, I want to send around 40 emails with some data in it to 40 recepients. Can it be done in one jcl step giving a datafile with all the tags for all 40 emails, or do i need to write 40 different SMTP steps? Basically can we include any data termination character?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes..its possible….below is the example to do that. Below JCL is sending 2 emails. The data termination in SMTP step is period “.”.
So keep on repeating these and you can create multiple emails.

//IEBGENER JOB ACCT,’DATA COPY’,MSGCLASS=J,CLASS=A
//NORMRC EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *,LRECL=80
HELO <SYSTEMID>
MAIL FROM:<USERID@SYSTEMID>
RCPT TO:<USERID@SYSTEMID>
DATA
From: <USERID@SYSTEMID>
To: <USERID@SYSTEMID>
Subject: Test Mail-1

TEST MAIL-1 FROM MAINFRAME..the below period is key to generate 2nd email..otherwise the rest of the content will be treated as email body content.
.
HELO <SYSTEMID>
MAIL FROM:<USERID@SYSTEMID>
RCPT TO:<USERID@SYSTEMID>
DATA
From: <USERID@SYSTEMID>
To: <USERID@SYSTEMID>
Subject: Test Mail-2

TEST MAIL-2 FROM MAINFRAME

/*
//SYSUT2 DD SYSOUT=(B,SMTP),LRECL=80
//SYSIN DD DUMMY

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • WoodEngineer
    Help text says up to 300 recipients or internet addresses can be specified. Each of those values will be in its own "field" in the SNDDST command using this syntax: SNDDST TOINTNET((abc@abc.com) (xyz@abc.com) (iseries@abc.com))
    6,725 pointsBadges:
    report
  • TomLiotta
    Note that there is a "JCL" tag on the question. Is this an AS/400 problem? I assumed it was mainframe. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following