View previous topic :: View next topic |
Author |
Message |
durgamallesh Beginner

Joined: 16 Aug 2004 Posts: 12 Topics: 6 Location: United Kingdom
|
Posted: Wed Nov 10, 2004 1:38 am Post subject: How to send a mail with attachment thru JCL...? |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
durgamallesh Beginner

Joined: 16 Aug 2004 Posts: 12 Topics: 6 Location: United Kingdom
|
Posted: Wed Nov 10, 2004 11:34 pm Post subject: |
|
|
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 |
|
 |
durgamallesh Beginner

Joined: 16 Aug 2004 Posts: 12 Topics: 6 Location: United Kingdom
|
Posted: Mon Nov 15, 2004 2:41 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Nov 15, 2004 4:56 am Post subject: |
|
|
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
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
durgamallesh Beginner

Joined: 16 Aug 2004 Posts: 12 Topics: 6 Location: United Kingdom
|
Posted: Mon Nov 15, 2004 11:44 pm Post subject: |
|
|
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 |
|
 |
gans79 Beginner
Joined: 31 Aug 2005 Posts: 51 Topics: 27
|
Posted: Mon Jan 21, 2008 5:13 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
gans79 Beginner
Joined: 31 Aug 2005 Posts: 51 Topics: 27
|
Posted: Tue Jan 22, 2008 5:47 am Post subject: |
|
|
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 |
|
 |
|
|