View previous topic :: View next topic |
Author |
Message |
vikramdr Beginner
Joined: 15 Feb 2003 Posts: 15 Topics: 11
|
Posted: Sun Feb 16, 2003 10:42 am Post subject: Sending a mail with attachment using XMIT |
|
|
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.
But, I want to send a mail which should have message and my pds member as attchment using XMIT. How to do this ?
Vikram. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Sun Feb 16, 2003 11:42 pm Post subject: |
|
|
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 |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Mon Feb 17, 2003 2:36 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Feb 17, 2003 6:44 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Feb 17, 2003 8:46 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Feb 17, 2003 9:29 am Post subject: |
|
|
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 |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Fri Feb 21, 2003 3:48 am Post subject: |
|
|
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 |
|
|
bob_buxton Beginner
Joined: 20 Dec 2002 Posts: 44 Topics: 0 Location: Hampshire, England
|
Posted: Fri Feb 21, 2003 5:42 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Mar 04, 2003 8:16 am Post subject: |
|
|
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
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Mar 05, 2003 1:11 am Post subject: |
|
|
Vikram,
Could you provide the code for sending file from MF to PC by email using xmit.
Diba. |
|
Back to top |
|
|
manojagrawal Beginner
Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Mar 20, 2003 7:04 am Post subject: |
|
|
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 |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Mar 20, 2003 9:09 am Post subject: |
|
|
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 |
|
|
manojagrawal Beginner
Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Fri Mar 21, 2003 3:06 am Post subject: |
|
|
Hi Diba,
Did the same as you said, but still no success!!!!
How can we give some text for the mail?????
Regards,
Manoj. |
|
Back to top |
|
|
somuk Beginner
Joined: 04 Feb 2003 Posts: 113 Topics: 37
|
Posted: Fri Apr 04, 2003 8:00 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Apr 04, 2003 1:07 pm Post subject: |
|
|
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 |
|
|
|
|