View previous topic :: View next topic |
Author |
Message |
kseenu Beginner
Joined: 08 Jun 2004 Posts: 11 Topics: 5
|
Posted: Wed Jul 12, 2006 8:24 am Post subject: E-Mail- Address & Message Configurable |
|
|
Hello All,
Based on the job successful execution, we have to send mail.
The Address and the Message should be modified. Instead of coding the mail address & message in the JCL, we have coded in the same in a spearate dataset and included them in the JCL. But the mail is not being generated.
The JCL is
Code: |
//ALRTMSG EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MY.PDS.ALERTS(ADDRESS), --> contains the Address & the Domain Name
/ DISP=SHR
// DD DSN=MY.PDS.ALERTS(MESSAGE), --> This contains the Subject & Message
// DISP=SHR
//SYSUT2 DD SYSOUT=(A,SMTP)
//*
|
IF we hard code the Address and the Message in the JCL, we are able to receive the mail.
Is there any way, that we can able to change the address & Message without modifying the JCL?
Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jul 12, 2006 8:31 am Post subject: |
|
|
kseenu,
First make sure that both members are copied. run this simple test. Upon successful completion of the job check the SYSUT2 sysout and see if it did copy the contents from address and message
Code: |
//ALRTMSG EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MY.PDS.ALERTS(ADDRESS),
/ DISP=SHR
// DD DSN=MY.PDS.ALERTS(MESSAGE),
// DISP=SHR
//SYSUT2 DD SYSOUT=*
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
kseenu Beginner
Joined: 08 Jun 2004 Posts: 11 Topics: 5
|
Posted: Wed Jul 12, 2006 10:23 pm Post subject: |
|
|
Hi Kolusu,
It did copy the both the members and I was able to see the entire output on the SYSUT2. It was displaying in the proper format for sending mail. Still I didn't receive any mail |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Jul 13, 2006 7:19 am Post subject: |
|
|
Just a thought but do the members have sequence numbers? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jul 13, 2006 7:26 am Post subject: |
|
|
kseenu,
Check if the Members have data in column 72 thru 80
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Jul 13, 2006 7:51 am Post subject: |
|
|
Kolusu,
My question could be very simple ,what exactly are you trying to do by running this job.My understanding goes this way ;we are trying to send a email to a particular id with domain name,subject and message.Please correct me if i am wrong ?
Can you post a sample how would the contents be in both the members ADDRESS and MESSAGE and i would like to know more about the statement //SYSUT2 DD SYSOUT=(A,SMTP) and i am in the guess we are using SMTP Protocol that is why we are routing the output to SMTP ? _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
kseenu Beginner
Joined: 08 Jun 2004 Posts: 11 Topics: 5
|
Posted: Fri Jul 14, 2006 1:12 pm Post subject: |
|
|
Hi Kolusu,
The column between 72-80 is blank. It doesnt contain any Sequence Numebers.
Is there any way by which we can able to configue the mail address and messages?
We dont have XMIT in our shop. |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Fri Jul 14, 2006 1:34 pm Post subject: |
|
|
Does your message file have
.
quit
as the last 2 lines? |
|
Back to top |
|
 |
kseenu Beginner
Joined: 08 Jun 2004 Posts: 11 Topics: 5
|
Posted: Mon Jul 17, 2006 6:22 am Post subject: |
|
|
I dont have the . quit as my last line.
It contains only the Subject and the message.
Is it necessary to have . quit in the Last line
thanks
Seenu |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Jul 24, 2006 11:46 am Post subject: |
|
|
Kolusu,
I have tried using the code with only the email id modifications.But i have not received any mail and in the PDS member i have the textCan you please correct me ?
Code: |
//STEP1 EXEC PGM=IEBGENER
//*
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT2 DD SYSOUT=(A,SMTP)
//SYSUT1 DD *
HELO SYSA
MAIL FROM:<XXXX>
RCPT TO:<SHEKAR>
DATA
FROM: <XXXX>
TO: SHEKAR@HOTMAIL.COM
SUBJECT: file
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
BOUNDARY= "MYDELIM"
THIS MESSAGE IS IN MIME FORMAT
--MYDELIM
Content-Disposition: attachment; filename="YOUR ATTACH FILE.txt"
CONTENT-TYPE: TEXT/HTML
<PRE> <FONT>
// DD DISP=SHR,DSN=YOUR.PDS(MEMBER)
// DD *
--MYDELIM
.
quit
//*
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jul 24, 2006 11:54 am Post subject: |
|
|
Shekhar123,
Do you have SMTP started task? You need to have it before you can send emails. To check if SMTP is active, go to SDSF and see type
at the command prompt and see if there is a job running. If it is running then you can send emails from mainframe.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Mon Jul 24, 2006 12:45 pm Post subject: |
|
|
Kolusu,
Thanks for your reply.Unfortunately i do not have the SMTP task job not running in my system which was the cause of not sending mails.Hope I test it if i work on some other system. _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
|
|