View previous topic :: View next topic
|
Author |
Message |
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
Code: |
//*
//STEP01 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//*SYSUT1 DD DISP=SHR,DSN=XXXX.JCL(HEADER)
//* DD DISP=SHR,DSN=XXXX.JCL(BODY)
//SYSUT1 DD *
HELO N01A
MAIL FROM:<ABC@YAHOO.COM>
RCPT TO:<XYZ@YAHOO.COM>
DATA
FROM:<ABC@YAHOO.COM>
TO:<XYZ@YAHOO.COM>
SUBJECT: MAIL
THIS IS A TEST MAIL SENT FROM MAINFRAME.
RAVI.
/*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
|
I am using the above JCL to send mail from JCL, but i am not getting the mail. Does this depend on configuration or is there any alternate way to send mail from JCL. If this JCL is not correct pls send me the corrected one. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Are you following the guidelines as described here and here?
If so, then you should probably contact your Systems Programmers and have them review your code. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I changed the node to our subsystem node, then also i am not receiving the mail from the mainframe. Does the sysout class matter. Should it be changed. |
|
Back to top |
|
|
hariavinash
New User
Joined: 04 Jan 2006 Posts: 64
|
|
|
|
Your SMTP port MUST be opened to do this. If this is not enabled you will nto get anything out of the job you are submitting. talk to your systems guys. |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
The record length must be 80.. may be check it out as
//sysut2 dd sysout=(b,smtp),dcb=(recfm=f,lrecl=80) and give it a try. it works for me |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I tried by giving lrecl=80. It didnt work for me. |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
for me it worked in JCl whenever the indd has LRECL 80. Otherwise try Xmitting the file. For me it worked when i issued
XMIT node.smtp DA('you dataset here')
replace node with your LPAR name |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
Hi,
Where should we use XMIT command. Can we use that in the JCL. Please can you explain me the syntax of using this command and how to see our LPAR name.
Thanks, |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
You can test it by issuing the command in TSO command entry panel.
It is ususally at option 6 unless you shop has customizd the ISR primary panel. If you want to find the LPAR name you can check it in SDSF.
The Second word on the top line is usually the NODE name.
Cya0 |
|
Back to top |
|
|
nagasri83
New User
Joined: 20 May 2005 Posts: 15 Location: chennai
|
|
|
|
Will the IEBGENER utility supports triggering a mail? i dont think this will work. Generally you can use FTP utility.
Correct me if i am wrong anywhere.
Thanks
Srinivas B |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
IEBGENER per se does not have anything to do with trigerring the mail.
It just copies from SYSUT1 to SYSUT2. we redirect the sysut2 card to the SMTP writer while specifing
//SYSUT2 DD SYSOUT=(B,SMTP)
actually smtp should be the name of the SMTP writer runnind at your shop. It usually is SMTP. |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
one more thing to note is them SMTP cannot pickup the files from spool if thy are of spanned record types.
@ravi
can you open the tso command screen and issue the command
TSO SMSG SMTP STATS
it will give some stats. hope this helps.
Cya0 |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
Hi Windozer,
I tried the command mentioned by you to see the statistics of SMTP. I got the following message.
Msg from SMTP: * Last Up Time: Sun, 29 Oct 06 00:50:41 PDT
Msg from SMTP: * Statistics : 11/06 11/05 11/04 11/03
Msg from SMTP: * From TCP : 0 0 0 0
Msg from SMTP: * From Spool : 9 4 1 5
Msg from SMTP: * BSMTP Logs : 0 0 0 0
Msg from SMTP: * Error Mail : 0 1 0 2
Msg from SMTP: * To Local : 0 0 0 0
Msg from SMTP: * To RSCS : 0 0 0 0
Msg from SMTP: * To TCP : 13 5 1 8
Msg from SMTP: * Passive Opns : 0 0 0 0
Msg from SMTP: * Active Opens : 8 5 1 7
In this, the Error Mail is showing 1 and two. that means, the mail was not delivered due to some error? Can we know y it was not delivered. Y the BSMTP log is all zeros. Can you briefly explain the different messages which we get by this command.
Sorry to disturb you with my doubts.
Thank you very much. |
|
Back to top |
|
|
windozer
New User
Joined: 12 Feb 2006 Posts: 8
|
|
|
|
actually reading from that, each column represents the date. It is showing us the stats for the last 4 days.
If you have enough permisions..
In SDSF lookout for the job named SMTP. its owner is also SMTP. If you can try opening it. in that the LOG and other datasets might have some more information about the errors. It helped me.
You are welcome to ask more questions. In fact i just figured it out just a few weeks ago to make the darn thing work. If you can PM me your mail ID i can send you the actual SMTP Dataset that worked for me. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I am using the same jcl. If I pass the data instream, its delivering the mail. If I replace that with the control card (XXX.JCL(header) and XXX.JCL(body)), the mail is not delivered. Its giving the following error.
501 Syntax Error. No Args after 'DATA' command.
Please let me know if there is any problem. |
|
Back to top |
|
|
abhishek dadhichi
New User
Joined: 19 Apr 2007 Posts: 37 Location: Bangalore
|
|
|
|
Hi Ravi,
You can try the Below code :
//XMITNO EXEC PGM=IKJEFT1B
//SYSEXEC DD DISP=SHR,DSN=DATASET--->This should have the XMITIP logic.
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DSN=DATASET1(MEMBER1),DISP=SHR--->This member should contain %XMITIP (YOUR ID) -
MSGDD MESGTEXT -
FROM YOUR ID -
REPLYTO YOUR ID -
// DD DSN=DATASET2(MEMBER2),DISP=SHR----> This member should contain the subject of your mail.
//MESGTEXT DD DUMMY
//*
Just try to include the above step in your JCL and check. |
|
Back to top |
|
|
|