Page 1 of 2

JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sat May 25, 2013 11:46 pm
by mainframeexpert
I have executed the below given JCL, but its not sending the SMS, it was executed successfully.

/**********************************************************************
//STEP0001 EXEC PGM=IEBGENER
//**********************************************************************
//*$ SEND SMS TO A MOBILE *
//**********************************************************************
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP),DEST=(RNE)
//SYSUT1 DD *
HELLO HOST
MAIL FROM:XYZ@HOTMAIL.COM
RCPT TO:9990251038@IDEACELLULAR.NET
DATA
SUBJECT: TEST SPREADSHEET
MIME-VERSION: 1.0
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="TEST.XLS"
CONTENT-TYPE: TEXT/PLAIN
/*


Can anyone guide me on this?

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 12:12 am
by Robert Sample
Have you validated with the carrier the precise domain name to use? A quick Google search indicates that carriers do not typically support SMTP messages very well, and often change domain names to prevent SMTP issues. For example, SMTP traffic needs to be sent to txt.att.net instead of att.net -- and if this is the case with the carrier you are attempting to send to, then without getting the domain name right your message will pass through SMTP but not be delivered.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 12:46 am
by mainframeexpert
Whom can i contact for this context in IDEA(Carrier), i mean customer care or some technical guy in idea.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 1:20 am
by mainframeexpert
I have confirmed it is number@ideacellular.net.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 1:30 am
by mainframeexpert
Below given id the print of JESJCL.
  //********************************************************************
3 //STEP0001 EXEC PGM=IEBGENER                                         
  //********************************************************************
  //*$            send sms to a mobile                     
  //********************************************************************
4 //SYSIN    DD DUMMY                                                   
5 //SYSPRINT DD SYSOUT=*                                               
6 //SYSUT2   DD SYSOUT=(B,SMTP),DEST=(RNE)                             
7 //SYSUT1   DD *                                                       
  //*                                                                   


Its not getting printed after SYSUT!. Can someone suggest how can i make it execute it after that.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 4:13 am
by Robert Sample
You need to confirm with your site support group that class B is the right class, and that SMTP is the name of the SMTP started task. You should start by sending an email to yourself; only after you are receiving the email can you say that the mainframe parameters are set up correctly. After that, you can try to send to a phone -- but you're not likely to get a lot of help from this forum in doing so; in several years of monitoring forums, yours is the FIRST request for SMS message transmission that I can recall seeing.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 1:41 pm
by mainframeexpert
I have confirmed about the class. Class B is right.
  //*****************************************
3 //STEP0001 EXEC PGM=IEBGENER               
  //*****************************************
  //*$            SEND A SMS                 
  //*****************************************
4 //SYSIN    DD DUMMY                       
5 //SYSPRINT DD SYSOUT=W                     
6 //SYSUT2   DD SYSOUT=(B,SMTP)             
7 //SYSUT1   DD DSN=RT.XYZ202.SMS1,DISP=SHR


RT.XYZ202.SMS1

HELLO HOW ARE USE                                         
MAIL FROM:<XYZ@HOTMAIL.COM                    >
RCPT TO:<XYZ@HOTMAIL.COM                      >
RCPT TO:<XYZ@HOTMAIL.COM                      >
DATA                                                       
MIME-VERSION: 1.0                                         
CONTENT-TYPE: MULTIPART/MIXED;                             
 BOUNDARY="----=_NEXTPART_000_0005_01C034F6.F659E6E0"     
FROM: XYZ@HOTMAIL.COM                         
TO: XYZ@HOTMAIL.COM                           
CC: XYZ@HOTMAIL.COM                           
SUBJECT: DAILY HOT REPORT                                 
XMAILER: OFFICEPATH/SMTP-SEND  R3.2.3 , BY XYZ.           
------=_NEXTPART_000_0005_01C034F6.F659E6E0               
CONTENT-TRANSFER-ENCODING: 8BIT                           
CONTENT-TYPE: TEXT/PLAIN; CHARSET=US-ASCII                 
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=""               


Still its not working. I am not getting the e-mail on my hotmail ID.

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 6:48 pm
by Robert Sample
No surprise there about not getting the email since you do not have the SMTP commands correct. You need to find and read in its entirety RFC 2821 which is the Internet standard for SMTP, followed by reading the other IETF standards for MIME attachments. In my experience, when using MIME attachments, blank lines are critical:
HELO <mail server.domain name> <== you got the spelling wrong, and the domain name should be included
MAIL FROM:<XYZ@HOTMAIL.COM                    >
RCPT TO:<XYZ@HOTMAIL.COM                      >
RCPT TO:<XYZ@HOTMAIL.COM                      > <== sending two copies of the email to yourself?
DATA                                                       
MIME-VERSION: 1.0                                         
CONTENT-TYPE: MULTIPART/MIXED;                             
 BOUNDARY="----=_NEXTPART_000_0005_01C034F6.F659E6E0"     

FROM: XYZ@HOTMAIL.COM                         
TO: XYZ@HOTMAIL.COM                           
CC: XYZ@HOTMAIL.COM                           
SUBJECT: DAILY HOT REPORT                                 
XMAILER: OFFICEPATH/SMTP-SEND  R3.2.3 , BY XYZ.           

------=_NEXTPART_000_0005_01C034F6.F659E6E0               
CONTENT-TRANSFER-ENCODING: 8BIT                           
CONTENT-TYPE: TEXT/PLAIN; CHARSET=US-ASCII                 
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="" <== I think if you have an attachment, you need a file name

. <== where is your ending period? -- RFC 2821 tells you the ending period is NOT optional

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 8:14 pm
by mainframeexpert
I tried changing the File as you suggested. In this i am not including the attachment part. Still not working :-(

HELO HERTZ.COM                                             
MAIL FROM:<XYZ@HERTZ.COM                    >
RCPT TO:<XYZ1@YAHOO.CO.IN                   >
DATA                                                       
MIME-VERSION: 1.0                                         
CONTENT-TYPE: MULTIPART/MIXED;                             
 BOUNDARY="----=_NEXTPART_000_0005_01C034F6.F659E6E0"     
FROM: XYZ@HERTZ.COM                         
TO: XYZ1@YAHOO.CO.IN                         
SUBJECT: SENDING A MAIL                                     
XMAILER: OFFICEPATH/SMTP-SEND  R3.2.3 , BY XYZ.           

Re: JCL to send SMS from Mainframe to Mobile phone?

PostPosted: Sun May 26, 2013 11:52 pm
by Robert Sample
While technically allowed, spaces in the MAIL FROM or RCPT TO addresses (anything from the < to the >) may prevent your email from being processed. Try without the spaces. You should also try a simple text message -- no MIME parts or anything else -- since you need to get the SMTP right before doing anything complicated.