MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to send a mail with attachment thru JCL...?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
durgamallesh
Beginner


Joined: 16 Aug 2004
Posts: 12
Topics: 6
Location: United Kingdom

PostPosted: Wed Nov 10, 2004 1:38 am    Post subject: How to send a mail with attachment thru JCL...? Reply with quote

Hi,

I have a problem while trying to send a mail thru JCL...

here's the code ..
Code:

//WDESFTP  JOB 1340,                                 
//       NOTIFY=WDES,CLASS=A,                       
//       MSGCLASS=X,MSGLEVEL=(1,1)                   
//*                                                 
//FTPFIL  EXEC PGM=IKJEFT1B                         
//SYSEXEC DD DSN=XMITIP.L1.EXEC,DISP=SHR             
//SYSPRINT DD SYSOUT=*                               
//SYSTSPRT DD SYSOUT=*                               
//SYSTSIN DD *                                       
%XMITIP (Mail ID) -   
SUBJECT 'REPORT ' -                                 
MSGT 'NEW REPORT ' -                                 
FILE ('file name') -                       
FORMAT CSV                                           
/*                                                   


The error I got is
'WDESFTP FTPFIL SYSEXEC - DATA SET NOT FOUND'

what steplib should be used here...?

Thanks for your help in advance...!!
_________________
S.Durga Mallesh,
Project engineer.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 10, 2004 6:17 am    Post subject: Reply with quote

XMITIP is a freeware utitlity written in REXX by Lionel b.dyck

You need to install it on your machine. Check this link for installation guide

http://www.lbdsoftware.com/XMITIP-Install-Guide.pdf

Check this link for user guide

http://www.lbdsoftware.com/XMITIP-Guide.pdf

Download the source from here ( last one)

http://www.lbdsoftware.com/tcpip.html

Hope this helps...

Cheers

Kolusu

Btw did you try sending mails as shown in this links?

http://www.mvsforums.com/helpboards/viewtopic.php?t=439&highlight=email
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
durgamallesh
Beginner


Joined: 16 Aug 2004
Posts: 12
Topics: 6
Location: United Kingdom

PostPosted: Wed Nov 10, 2004 11:34 pm    Post subject: Reply with quote

Hi Kolusu,

Many thanks for ur quick response.

I will try to implement this and get back to you soon.

Thanks,
_________________
S.Durga Mallesh,
Project engineer.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
durgamallesh
Beginner


Joined: 16 Aug 2004
Posts: 12
Topics: 6
Location: United Kingdom

PostPosted: Mon Nov 15, 2004 2:41 am    Post subject: Reply with quote

Hi Kolusu,

I ran the following JCL
Code:

//WDESML   JOB WDES,'MAIL TO PC', 
//             CLASS=A,MSGCLASS=J,
//             MSGLEVEL=(1,1)     
//*                               
//*                                 
//STEP1    EXEC PGM=IEBGENER       
//SYSIN    DD   DUMMY               
//SYSPRINT DD   SYSOUT=*           
//SYSUDUMP DD   SYSOUT=*           
//SYSUT2   DD   SYSOUT=(A,SMTP)     
//SYSUT1   DD   *                   
HELO SYSD                           
MAIL FROM:<DURGAMALLESH.SUNKARA@******.COM>             
RCPT TO:<DURGAMALLESH.SUNKARA@***********.COM>       
DATA                                                   
FROM:      <DURGAMALLESH.SUNKARA@******.COM>             
TO:         DURGAMALLESH.SUNKARA@***********.COM     
SUBJECT: FILE                                           
MIME-VERSION: 1.0                                       
CONTENT-TYPE: MULTIPART/MIXED;                         
BOUNDARY=  "MYDELIM"                                   
THIS MESSAGE IS IN MIME FORMAT                         
--MYDELIM                                               
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="FILE.TXT"   
CONTENT-TYPE: TEXT/HTML                                 
<PRE> <FONT FACE="ARIAL" SIZE=1>                       
//         DD   DSN=WDES.ALL.JCLS(WDESML),DISP=SHR     
//         DD   *                                       
--MYDELIM                                               
.                                                       
QUIT                 


I got the 0 return code. But still i didn't get the mail.
SMTP is also enabled in our system.

Can u pls. help me out.

Many thanks,
_________________
S.Durga Mallesh,
Project engineer.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Mon Nov 15, 2004 4:56 am    Post subject: Reply with quote

Durgamallesh,

Try this Jcl. Make sure that the SYSD in your HELO parm is actually active. Also enclose the email address with < > . Also check the output class(sysut2)

Code:

//STEP0100 EXEC PGM=IEBGENER   
//SYSPRINT DD SYSOUT=*         
//SYSUT1   DD *                 
HELO SYSD                                       
MAIL FROM: <DURGAMALLESH.SUNKARA@******.COM>
RCPT TO: <DURGAMALLESH.SUNKARA@******.COM>                       
DATA                                             
FROM: <DURGAMALLESH.SUNKARA@******.COM>
TO: <DURGAMALLESH.SUNKARA@******.COM>                 
SUBJECT:Test email   
//         DD DSN=WDES.ALL.JCLS(WDESML),
//            DISP=SHR
//SYSUT2   DD SYSOUT=(B,SMTP)         
//SYSIN    DD DUMMY                   
//*                                   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
durgamallesh
Beginner


Joined: 16 Aug 2004
Posts: 12
Topics: 6
Location: United Kingdom

PostPosted: Mon Nov 15, 2004 11:44 pm    Post subject: Reply with quote

Hi Kolusu,

I tried to implement this JCL.
I checked the domain name and SYSD is correct.
But still i couldn't get the mail.

In Sysprint I got this warning...

DATA SET UTILITY - GENERATE
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT

PROCESSING ENDED AT EOD

Any comments on this....?

Thanks and Regards,
_________________
S.Durga Mallesh,
Project engineer.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Mon Jan 21, 2008 5:13 am    Post subject: Reply with quote

Hi,
I tried implementing the above JCL to send a dataset as a email attachment It worked .but one alphanumeric record "02E0006" was converted into "2.00E+06" in the ".csv" file . Can anybody letme know the reason and how to rectify it
----------------------------------------------------------------
HELO XXXXXX
MAIL FROM:<999999@XXX.COM>
RCPT TO:<999999@XXX.COM>
DATA
DATE:
FROM: JOB JOB1
SUBJECT: REPORT1
MIME-Version: 1.0
Content-type: multipart/mixed;
boundary="simpleboundary"

--simpleboundary

HERE'S THE REPORT AS AN ATTACHMENT

--------------------------------------------------------------------------
Thanks
Ganesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Mon Jan 21, 2008 11:34 am    Post subject: Reply with quote

gans79,

Check this link for a round about solution for your problem

http://www.mvsforums.com/helpboards/viewtopic.php?p=41425#41425

Hope this helps...
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Tue Jan 22, 2008 5:47 am    Post subject: Reply with quote

It worked kolusu, Thanks a lot . I really appreciate your time and effort in helping us solve problems in the need of the hour .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group