Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
email attachment using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vidyakonda

New User


Joined: 25 Jan 2006
Posts: 8

PostPosted: Thu Aug 17, 2006 11:07 pm    Post subject: email attachment using JCL
Reply with quote

Hi,

I tried all possible examples given in the forum for emailing attachments using JCL but none of them could get through.

Can someone please help me to give the exact code.

Thanks,
Vidya
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 18, 2006 1:36 am    Post subject: Re: email attachment using JCL
Reply with quote

The examples shown here didn't work?
Back to top
View user's profile Send private message
vidyakonda

New User


Joined: 25 Jan 2006
Posts: 8

PostPosted: Fri Aug 18, 2006 1:56 am    Post subject: Re: email attachment using JCL
Reply with quote

yes, they did not work, following is the code I tried


//STEP08 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD *
HELO TESTJCLS
MAIL FROM: <mail id>

RCPT TO: <mail id>
DATA
TO:TEST
SUBJECT: THIS IS A TEST MAIL FOR ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
BOUNDARY="AAAAAA"
--AAAAAA
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
CONTENT-TRANSFER-ENCODING: 7BIT

HI,
SAMEPLE TEST LINE 1
--AAAAAA
CONTENT-TYPE: APPLICATION/OCTET-STREAM; FILENAME="TESTFILE.TXT"
CONTENT-TRANSFER-ENCODING: ASCII
"
/*
// DD DSN=SAMPLE.REPORT,DISP=SHR
// DD *
--AAAAAA--
--------------------

result is the data is not sent as an attachment but as a body text.

Please suggest.

Vidya
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 18, 2006 2:12 am    Post subject: Re: email attachment using JCL
Reply with quote

Oops, sorry. You need to follow the steps in the next section.
Back to top
View user's profile Send private message
vidyakonda

New User


Joined: 25 Jan 2006
Posts: 8

PostPosted: Fri Aug 18, 2006 3:14 am    Post subject: Re: email attachment using JCL
Reply with quote

I could not get the following code
//B64 EXEC PGM=IRXJCL,
// PARM='ENBASE64'
//SYSEXEC DD DISP=SHR,DSN=ibmuser.SYSEXEC


modified code says
//B64 EXEC PGM=XMITB64
//STEPLIB DD DISP=SHR,DSN=load.library.with.XMITB64


where can i get the load XMITB64

Please suggest
Back to top
View user's profile Send private message
Knowledge Hunter

New User


Joined: 17 Aug 2006
Posts: 22
Location: India

PostPosted: Sat Aug 19, 2006 1:11 am    Post subject: Re: email attachment using JCL
Reply with quote

Hi Vidyakonda,

Try the below code. The below code will work if you have SWMAIL facility enabled.


//MAILJCL JOB (CXR0,XXXX,100,10),,
// CLASS=B,MSGCLASS=D,PRTY=12,NOTIFY=&SYSUID,
// MSGLEVEL=(2,1)
//EMAIL1 EXEC PGM=IKJEFT01,DYNAMNBR=40,
// PARM='%SWMAIL',COND=(0,GT)
//SYSPROC DD DISP=SHR,
// DSN=SUPT.TCP.EXEC
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSTSIN DD DUMMY
//ATTACH01 DD DUMMY
//TO DD DISP=SHR,DSN=USER.MAILING.LIST
//NOTE DD DISP=SHR,DSN=USER.MAILING.LIST.NOTE
//PARMS DD DISP=SHR,DSN=USER.MAILING.LIST.PARM //
/*


The user.mailing.list control card contains the peoples id whom you want to send the mail.

User.mailing.list.note control card contains your msg.

user.mailing.list.parm contains your subject and from address



Another way of sending mail is by using "tso sendmail" facility.

Thanks & Regards,
Knowledge Hunter
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Sat Aug 19, 2006 1:41 am    Post subject: Re: email attachment using JCL
Reply with quote

vidyakonda, I can't help too much, since this is not the way we do our emails. However, as an FYI, I'm pretty sure that you do NOT need to encode a regular text file with BASE64 encoding. That's only necessary for binary files (.zip files, executable files, etc.).
Back to top
View user's profile Send private message
vidyakonda

New User


Joined: 25 Jan 2006
Posts: 8

PostPosted: Sat Aug 19, 2006 1:50 am    Post subject: Re: email attachment using JCL
Reply with quote

Thanks for the message, but

I do not have SWMAIL enabled.

Also TSO SENDMAIL option too din't work.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts How to send email with Rich Text usin... santhosh5983 JCL & VSAM 4 Fri Apr 08, 2016 2:30 am
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am

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