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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts SNMP trap from Mainframe bipinpeter Compuware & Other Tools 6 Wed Apr 26, 2017 3:05 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Opening in Allianz India- T... Rajesh Gopinathan Mainframe Jobs 0 Wed Apr 19, 2017 11:33 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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