Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
email an attachment through JCL
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19254
Location: Inside the Matrix

PostPosted: Sun Jun 14, 2009 2:13 am    Post subject:
Reply with quote

Hello,

In addition to what Robert mentioned, it may be that the mail was sent, but was denied some way (treated as junk, deleted, rejected, etc) by the receiving e-mail system.
Quote:
You really, really, really must get site support people involved
Yup, you really really should. . .
Back to top
View user's profile Send private message

Nair47

New User


Joined: 13 Jun 2009
Posts: 2
Location: vizag

PostPosted: Mon Jun 15, 2009 6:00 pm    Post subject:
Reply with quote

hi,
thank u so much....one of my freind had written the same code....but this worked for him.....and i recieved mail sent by him through main frame....every thing was fine...but the thing is he has sent me using vsam file......but this didnot work for me when i tried for it directly....the main frame server name and mails every thing supports the mainframe mails....
Back to top
View user's profile Send private message
Srinivas46

New User


Joined: 03 Oct 2009
Posts: 4
Location: Chennai

PostPosted: Sat Feb 27, 2010 8:33 am    Post subject: email an attachment through JCL
Reply with quote

Hi,

I was able to use the code to send an email with attachement as a Text file. Now, my requirement is as follows:
I have a huge MS word document (around 20 MB) which was compressed using ZIP and then FTP'ed to a mainframe dataset in Binary format.
I want an email to be sent with the MS Word doc (or the ZIP file) as an attachment. Can this be done thru JCL ?

Please let me know if it can be done thru any other means.

Thanks,
Srinivas

Robert Sample wrote:
This code sends the data as a text attachment:
Code:
//MAILPROC EXEC PGM=IEBGENER
//SYSABEND DD   SYSOUT=*
//SYSTOTAL DD   SYSOUT=*
//SYSLIST  DD   SYSOUT=*
//SYSPRINT DD   SYSOUT=*
//SYSUT2   DD   SYSOUT=(9,SMTP)
//SYSIN    DD   DUMMY
//*
//SYSUT1 DD *
HELO MAINFRAME.********
MAIL FROM: <MAINFRAME@********>
RCPT TO: <RSAMPLE@********>
DATA
FROM:     MAINFRAME@********
TO:       ROBERT SAMPLE
SUBJECT:  TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE.TXT
//       DD DSN=TTSSRS0.JCL.CNTL(EMAILATT),DISP=SHR
//       DD DSN=TTSSRS0.JCL.CNTL(EMAILAT),DISP=OLD
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19254
Location: Inside the Matrix

PostPosted: Sat Feb 27, 2010 9:06 am    Post subject:
Reply with quote

Hello,

Is XMITIP available on your system?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8553
Location: Dubuque, Iowa, USA

PostPosted: Sat Feb 27, 2010 5:33 pm    Post subject:
Reply with quote

Quote:
I have a huge MS word document (around 20 MB) which was compressed using ZIP and then FTP'ed to a mainframe dataset in Binary format.
I want an email to be sent with the MS Word doc (or the ZIP file) as an attachment. Can this be done thru JCL ?
No -- JCL does nothing but execute programs. If you wanted to use a utility like IEBGENER to do this, that would work. But since JCL does nothing by itself, you cannot do anything "thru JCL".

Even if you use a utility such as IEBGENER, you have to consult with your site support group. They have established a limit on the size of the SMTP email (the default is 512K), and unless that limit is larger than the size of the document you are attempting to email, it cannot be sent via SMTP.
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Thu Aug 26, 2010 4:42 pm    Post subject:
Reply with quote

Hi,
I have tried searching through out the forum and got so far and just hung up at last step, Thanks in advace for your help:

I have to do some checks on ESP which get into a DS of LRECL of 133 and then has to send it as an attachment ( rqrmts are pretty same)

If I do it with SYSUT DD * as below
Code:


//JS015   EXEC PGM=IEBGENER,                                           
//             COND=(0,LT)                                             
//SYSUT1    DD *                                                       
  HELO CS01                                                             
  MAIL FROM:<SAURABH.XXXXXX@XXXXX.COM>                               
  RCPT TO:<SAURABH.XXXXXX@XXXXX.COM>                                 
  DATA                                                                 
  FROM: SAURABH.XXXXXX@XXXXX.COM                                     
  TO:  SAURABH.XXXXXX@XXXXX.COM                                       
  SUBJECT: CS01 ESP JOBS THAT HAVE FAILED OR ARE IN PREDWAIT STATE.     
  MIME-VERSION: 1.0                                                     
  CONTENT-TYPE: TEXT/PLAIN                                             
  CONTENT-DISPOSITION: ATTACHMENT; FILENAME=IDWJOBS.TXT                 
  ===================================================                   
  FOLLOWING ARE CS01 ESP JOBS THAT HAVE FAILED OR ARE IN PREDWAIT STATE.
  (CREATED BY PRNDXXXX)                                                 
//      DD DSN=XXXXXX.PRND.PRNDDES3.ESPRPT4,DISP=SHR               
//          DD DSN=OFFSAC.CTLLIB.EXIT,DISP=SHR                         
//SYSUT2    DD SYSOUT=B,DEST=(CS01,SMTP),                               
//          DCB=(RECFM=FB,LRECL=133)                                   


Spool says " DATA SET UTILITY - GENERATE
IEB311I CONFLICTING DCB PARAMETERS " and MAXCC 12

I get an MAXCC 12 and If I put the same with in a DS of 133 LRECL , I t gives MAX CC 0 gives the result in spool but no email.

BLKSIZE of all the three DS are same as below.

Code:

//JS015   EXEC PGM=IEBGENER,                                       
//             COND=(0,LT)                                         
//SYSUT1    DD DSN=XXXXXX.CTLLIB.TOOL,DISP=SHR                     
//          DD DSN=XXXXXX.PRND.PRNDDES3.ESPRPT3,DISP=SHR           
//          DD DSN=XXXXXX.CTLLIB.EXIT,DISP=SHR                     
//SYSUT2    DD SYSOUT=B,DEST=(CS01,SMTP),                           
//          DCB=(RECFM=FB,LRECL=133)                               
//SYSIN     DD DUMMY                                               
//SYSPRINT  DD SYSOUT=*                                             
//*****************************************************************


Let me know if anything else is needed.
I have searched thruout the forum.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8553
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 26, 2010 5:20 pm    Post subject:
Reply with quote

This needs to be put into a file with LRECL 133 and not kept instream:
Code:
  HELO CS01                                                             
  MAIL FROM:<SAURABH.XXXXXX@XXXXX.COM>                               
  RCPT TO:<SAURABH.XXXXXX@XXXXX.COM>                                 
  DATA                                                                 
  FROM: SAURABH.XXXXXX@XXXXX.COM                                     
  TO:  SAURABH.XXXXXX@XXXXX.COM                                       
  SUBJECT: CS01 ESP JOBS THAT HAVE FAILED OR ARE IN PREDWAIT STATE.     
  MIME-VERSION: 1.0                                                     
  CONTENT-TYPE: TEXT/PLAIN                                             
  CONTENT-DISPOSITION: ATTACHMENT; FILENAME=IDWJOBS.TXT                 
  ===================================================                   
  FOLLOWING ARE CS01 ESP JOBS THAT HAVE FAILED OR ARE IN PREDWAIT STATE.
  (CREATED BY PRNDXXXX)                                                 
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Thu Aug 26, 2010 7:41 pm    Post subject: Mailing frm Mainframes
Reply with quote

When I keep the code Instream the job goes good with MAX CC 0 but no email id being received while I received the mail when the lrecl was 80 ???
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8553
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 26, 2010 7:50 pm    Post subject:
Reply with quote

You would be best off contacting your site support group, who can look at your actual job output to determine what happened. They can also turn on debugging in the SMTP started task and look at more details about what SMTP gets for your job.

Without actual job output to look at, we cannot do much.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19254
Location: Inside the Matrix

PostPosted: Thu Aug 26, 2010 8:27 pm    Post subject:
Reply with quote

Hello,

Quote:
I won't be able to contact somebody else....
Why not?

Schwab has quite a few excellent technical people. . .
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Thu Aug 26, 2010 8:38 pm    Post subject:
Reply with quote

Quote:
Schwab has quite a few excellent technical people. . .


very true, but I doubt that is the problem.

probably, the TS's firm, has very few, and don't want the client to know that fact.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19254
Location: Inside the Matrix

PostPosted: Thu Aug 26, 2010 11:20 pm    Post subject: Reply to: email an attachment through JCL
Reply with quote

Quote:
probably, the TS's firm, has very few, and don't want the client to know that fact.
And the post i quoted has magically disappeared. . .

icon_confused.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Send email without SMTP Kaliragavendran All Other Mainframe Topics 5 Thu Sep 05, 2019 10:55 am
No new posts Using the SAS module to email mainfra... elixir1986 JCL & VSAM 3 Thu Mar 14, 2019 10:04 pm
No new posts JCL to send email along with formated... wik123 JCL & VSAM 5 Thu Aug 09, 2018 9:48 am
No new posts Need Help on sending email by includi... wik123 JCL & VSAM 9 Mon Jul 30, 2018 2:59 pm
This topic is locked: you cannot edit posts or make replies. Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 14 Sun Nov 19, 2017 7:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us