JCL to send SMS from Mainframe to Mobile phone?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

JCL to send SMS from Mainframe to Mobile phone?

Postby mainframeexpert » Sat May 25, 2013 11:46 pm

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?
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

 

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

Postby Robert Sample » Sun May 26, 2013 12:12 am

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.
Robert Sample
Global moderator
 
Posts: 3375
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 224 times

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

Postby mainframeexpert » Sun May 26, 2013 12:46 am

Whom can i contact for this context in IDEA(Carrier), i mean customer care or some technical guy in idea.
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby mainframeexpert » Sun May 26, 2013 1:20 am

I have confirmed it is number@ideacellular.net.
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby mainframeexpert » Sun May 26, 2013 1:30 am

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.
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby Robert Sample » Sun May 26, 2013 4:13 am

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.
Robert Sample
Global moderator
 
Posts: 3375
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 224 times

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

Postby mainframeexpert » Sun May 26, 2013 1:41 pm

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.
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby Robert Sample » Sun May 26, 2013 6:48 pm

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
Robert Sample
Global moderator
 
Posts: 3375
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 224 times

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

Postby mainframeexpert » Sun May 26, 2013 8:14 pm

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.           
mainframeexpert
 
Posts: 7
Joined: Sat May 25, 2013 8:57 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby Robert Sample » Sun May 26, 2013 11:52 pm

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.

These users thanked the author Robert Sample for the post:
mainframeexpert (Sat Jun 08, 2013 3:18 pm)
Robert Sample
Global moderator
 
Posts: 3375
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 224 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post