IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

email attachment using JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Fri Aug 18, 2006 1:36 am
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
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

Global Moderator


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

PostPosted: Fri Aug 18, 2006 2:12 am
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
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
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

Global Moderator


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

PostPosted: Sat Aug 19, 2006 1:41 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts mail attachment with excel format All Other Mainframe Topics 2
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts Problem while sending special charact... JCL & VSAM 4
No new posts TXT2PDF and then SMTP email a PDF JCL & VSAM 4
Search our Forums:

Back to Top