MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sending a mail with attachment using XMIT
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics
View previous topic :: View next topic  
Author Message
vikramdr
Beginner


Joined: 15 Feb 2003
Posts: 15
Topics: 11

PostPosted: Sun Feb 16, 2003 10:42 am    Post subject: Sending a mail with attachment using XMIT Reply with quote

Hi.
I have to send a mail from MVS to PC as mail. I am sending a member of a PDS which has LRECL > 80 using DSNAME of xmit. I am receving the member of PDS as an attachment in the mail. This if fine for me. Smile

But, I want to send a mail which should have message and my pds member as attchment using XMIT. How to do this ? Crying or Very sad

Vikram.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sun Feb 16, 2003 11:42 pm    Post subject: Reply with quote

Vikram,

The following JCL will give you the desired results.Assuming that you have the started task SMTP on your system.The only limitation for the attachment is it cannot have an LRECL greater than 80.

Code:

//STEP1    EXEC PGM=IEBGENER
//*
//SYSIN    DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT2   DD SYSOUT=(A,SMTP)
//SYSUT1   DD *
HELO SYSA
MAIL FROM:<KOLUSU@HOTMAIL.COM>
RCPT TO:<VIKRAM@HOTMAIL.COM>
DATA
FROM:      <KOLUSU@HOTMAIL.COM>
TO:         VIKRAM@HOTMAIL.COM
SUBJECT: file
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;             
BOUNDARY=  "MYDELIM"
THIS MESSAGE IS IN MIME FORMAT
--MYDELIM
Content-Disposition: attachment; filename="YOUR ATTACH FILE.txt"
CONTENT-TYPE: TEXT/HTML
 <PRE> <FONT FACE="ARIAL" SIZE=1>
//          DD DISP=SHR,DSN=YOUR.PDS(MEMBER)
// DD *
--MYDELIM
.
quit
//*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Mon Feb 17, 2003 2:36 am    Post subject: Reply with quote

Kolusu,
How do you find whether SMTP is enabled in your system.

Cheers,
Coolman.
________
Toyota TF107 history


Last edited by coolman on Sat Feb 05, 2011 1:18 am; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Feb 17, 2003 6:44 am    Post subject: Reply with quote

coolman,

SMTP is a part of MVS.go to SDSF and type PRE SMTP* and you should be able to find a started task. If you see any thing with that, then SMTP is running and your shop is configured to SMTP.

or you can ask your system folks

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Feb 17, 2003 8:46 am    Post subject: Reply with quote

This is great! Now I have few questions?

1 I changed the to address in kolusu's jcl and after submitting I got a mail from kolusu. Now how can kolusu deny that he didn't send it.

2 What do I need to change to get the member as attachment too?

3 Is there any method to do it thru REXX?

4 Are there any REXX, JCL reference manuals on this topic?

Diba
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Feb 17, 2003 9:29 am    Post subject: Reply with quote

Dibakar,

Quote:

I changed the to address in kolusu's jcl and after submitting I got a mail from kolusu. Now how can kolusu deny that he didn't send it.


Nope the sender's name will be an address which does not accept any replies.Usually it will be a common address instead of a individual email id.

Quote:

What do I need to change to get the member as attachment too?


The above posted jcl will indeed send the member as an attachment

Quote:

Is there any method to do it thru REXX?


I am not an expert in rexx,but I am pretty sure that it can be done.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Fri Feb 21, 2003 3:48 am    Post subject: Reply with quote

Kolusu,

I submitted the JCL that you had posted....The job gave me a MAXCC = 0, its been about 2 hours since I submitted the job....I know Im missing something...
can you plz help me...

Cheers,
Coolman
________
herbal shop


Last edited by coolman on Sat Feb 05, 2011 1:19 am; edited 1 time in total
Back to top
View user's profile Send private message
bob_buxton
Beginner


Joined: 20 Dec 2002
Posts: 44
Topics: 0
Location: Hampshire, England

PostPosted: Fri Feb 21, 2003 5:42 am    Post subject: Reply with quote

Going back to original use of the TSO XMIT command you can send a message and dataset at the same time by specifying the Message keyword or one of its alternatives:MESSAGE/MSG/MSGDDNAME(ddname)/MSGFILE(ddname)/ MSGDATASET(dsname)/MSGDSNAME(dsname)

See the XMIT help info for further details.
Quote:

But, I want to send a mail which should have message and my pds member as attchment using XMIT. How to do this ?

Vikram

_________________
Bob Buxton
Ex Websphere MQ for zOS development
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Mar 04, 2003 8:16 am    Post subject: Reply with quote

I tried to email a file as attachement using kolusu's jcl but first two lines are not coming.

Input file, five lines
Code:

/* REXX to compare current member with its Endevor version */

 say 'HI'

 exit


Attachment, 3 lines
Code:

 say 'HI'

 exit


Hi again:

I changed the attchment step from
Code:

//          DD DISP=SHR,DSN=TSO.MDP.MDARNDS.COPYLIB(CCRGLRWS)

to
Code:

//          DD *

//          DD DISP=SHR,DSN=TSO.MDP.MDARNDS.COPYLIB(CCRGLRWS)


and I am getting it properly now.
Diba.


Last edited by Dibakar on Thu Mar 06, 2003 4:45 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Mar 05, 2003 1:11 am    Post subject: Reply with quote

Vikram,

Could you provide the code for sending file from MF to PC by email using xmit.

Diba.
Back to top
View user's profile Send private message Send e-mail
manojagrawal
Beginner


Joined: 25 Feb 2003
Posts: 124
Topics: 29

PostPosted: Thu Mar 20, 2003 7:04 am    Post subject: Reply with quote

Hi,

I did get the mail using the same JCL as Kolusu gave, but i didnt get any attachment nor any body. Just the Subject line saying FILE. Any suggestions?

Regards,
Manoj.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Mar 20, 2003 9:09 am    Post subject: Reply with quote

Manoj,

I was having some problems with this JCL too, especially in sending REXX prgrams (because of /* REXX commnet */), then

1 I combined the lines 'CONTENT-TYPE ...;' and 'BOUNDARY="MYDELIM"' into single line.

2 Between the two --MYDELIM I gave following code
Code:

CONTENT-TYPE: APPLICATION/OCTET-STREAM; NAME=EMAIL.TXT
/*
//          DD *

//          DD DISP=SHR,DSN=TSO.PIES.MACROS(EMAIL)
//          DD *

Diba
Back to top
View user's profile Send private message Send e-mail
manojagrawal
Beginner


Joined: 25 Feb 2003
Posts: 124
Topics: 29

PostPosted: Fri Mar 21, 2003 3:06 am    Post subject: Reply with quote

Hi Diba,

Did the same as you said, but still no success!!!! Sad

How can we give some text for the mail????? Question

Regards,
Manoj. Rolling Eyes
Back to top
View user's profile Send private message
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Fri Apr 04, 2003 8:00 am    Post subject: Reply with quote

Kolusu,
When I tried your JCL for sending a file with LRECL =605 it is not coming as an attachment rather the file is printed in the message body (but with a length of 80 ,the remaining data were truncated). But when I put the control settings (ie;SYSUT1 DD * ---- ) into a dataset with the same DISP (ie ; LRECL=605,etc..) as my attachment dataset .
Code:

//SYSUT1   DD DSN=MY.CONTROL.DATA,DISP=SHR  ==> Control statements
//              DD DISP=SHR,DSN=MY.ATTACH.FILE ==> Attachment


I'm able to receive it properly.. But this seems to be cumbersome since I need to create a new dataset for the control statements whenever my attachment DISP changes.. Pl advice.

Regds
-Somu
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Apr 04, 2003 1:07 pm    Post subject: Reply with quote

Somuk,

Since you are using DD * for sysut1 it will be defaulted to 80 bytes. So In order to receive longer length files , create header with the same lrecl as the email file. or better even create the email headers in the beginning of the file itself.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group