View previous topic :: View next topic
|
Author |
Message |
vidyakonda
New User
Joined: 25 Jan 2006 Posts: 8
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The examples shown here didn't work? |
|
Back to top |
|
|
vidyakonda
New User
Joined: 25 Jan 2006 Posts: 8
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Oops, sorry. You need to follow the steps in the next section. |
|
Back to top |
|
|
vidyakonda
New User
Joined: 25 Jan 2006 Posts: 8
|
|
|
|
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 |
|
|
Knowledge Hunter
New User
Joined: 17 Aug 2006 Posts: 22 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
vidyakonda
New User
Joined: 25 Jan 2006 Posts: 8
|
|
|
|
Thanks for the message, but
I do not have SWMAIL enabled.
Also TSO SENDMAIL option too din't work. |
|
Back to top |
|
|
|