Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to send dataset as an e-mail attachment from mainframe

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

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Tue Nov 21, 2006 4:28 pm    Post subject: How to send dataset as an e-mail attachment from mainframe
Reply with quote

i have a requirement to send a dataset ( report files ) to users through e-mail attachments, i trierd different ways, where im getting dataset contents in mail as message, but i want to have it as attachment with user defined attachment names.

i used the following JCL, which i took it from this forum its working fine but the problem is, i want to have the datasets as attachments with user defined attachment names.


//STEP01 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//*SYSUT1 DD DISP=SHR,DSN=XXXX.JCL(HEADER)
//* DD DISP=SHR,DSN=XXXX.JCL(BODY)
//SYSUT1 DD *
HELO N01A
MAIL FROM:<ABC@YAHOO.COM>
RCPT TO:<XYZ@YAHOO.COM>
DATA
FROM:<ABC@YAHOO.COM>
TO:<XYZ@YAHOO.COM>
SUBJECT: MAIL
THIS IS A TEST MAIL SENT FROM MAINFRAME.
/*

//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Nov 21, 2006 5:47 pm    Post subject:
Reply with quote

You can find the answer here.

O.
Back to top
View user's profile Send private message
lal_arun_272

New User


Joined: 09 Oct 2006
Posts: 31
Location: Bangalore

PostPosted: Tue Nov 21, 2006 5:47 pm    Post subject: Re: How to send dataset as an e-mail attachment from mainfra
Reply with quote

Hi

//STEP01 EXEC MAILWAY
//MAIL DD *
TO: ABC.TEST.COM
SUBJECT:TEST
// DD DSN='PS NAME'
//*

This will help you

Thanks
Arun





Thanks
Arun
Back to top
View user's profile Send private message
sri_code

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Tue Nov 21, 2006 6:48 pm    Post subject:
Reply with quote

hi ARUN,

Cant we use the same IEBGENER send email attachment.
Back to top
View user's profile Send private message
sri_code

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Tue Nov 21, 2006 7:05 pm    Post subject:
Reply with quote

I HAVE USED FOLLOWING CODE.
But the problem is im getting mail with attachment but the attachment does not contain records in dataset (i.e., DSN=data.set.name), it is empty.

---------------------------------------------------------------------------
//STEP01 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD *

HELO N01A
MAIL FROM:<ABC@YAHOO.COM>
RCPT TO:<XYZ@YAHOO.COM>
DATA
FROM:<ABC@YAHOO.COM>
TO:<XYZ@YAHOO.COM>
SUBJECT: MAIL
THIS IS A TEST MAIL SENT FROM MAINFRAME

MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="BOUNDRY1"
--BOUNDRY1
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
CONTENT-TRANSFER-ENCODING: 7BIT

Hallo
This is your Notepad file
--BOUNDRY1
CONTENT-TYPE: APPLICATION/OCTET-STREAM;
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="WHATEVER.TXT"

// DD DISP=SHR,DSN=data.set.name
//
Back to top
View user's profile Send private message
abhishek.pradhan

New User


Joined: 22 Nov 2006
Posts: 2
Location: bangalore

PostPosted: Fri Nov 24, 2006 12:42 pm    Post subject: Re: How to send dataset as an e-mail attachment from mainfra
Reply with quote

Hi,

We can use XMIT to do this task, but i dont have the correct JCL for XMIT job. Can anybody help?

-Abhi
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 6 Fri Mar 24, 2017 2:24 pm
No new posts FTP from Mainframe to Unix - with CRLF vasanthz All Other Mainframe Topics 6 Thu Mar 23, 2017 5:12 am
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us