Multiple Attachments in Email



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Multiple Attachments in Email

Postby dick scherrer » Thu Sep 23, 2010 3:32 am

Hello,

I don't understand why that is needed but guess I don't need to know that.
Wrong guess ;)

Without this, the "stuff" is not an e-mail. . . :?

Good luck.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Re: Multiple Attachments in Email

 

Re: Multiple Attachments in Email

Postby phow0906 » Thu Sep 23, 2010 7:34 pm

You are certainly right! You have been a great help and I do appreciate it. Oh, and I was not trying to ignore your advice but for some reasons I can see all the response at times. But think I have it all now. Thanks again! Pam
phow0906
 
Posts: 9
Joined: Wed Sep 22, 2010 11:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Multiple Attachments in Email

Postby Robert Sample » Thu Sep 23, 2010 7:37 pm

Glad to hear you've got it. If you have other questions, post again and we'll see if we can resolve them.

Just out of curiosity: which browser are you using -- perhaps the web page isn't rendering correctly under it?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Multiple Attachments in Email

Postby phow0906 » Mon Sep 27, 2010 6:23 pm

I still cannot get this to work. I did copy and paste the code but it didn't work. The first report will send but then get an RC=12. Below is my code (which is code that was posted) and the error message. I do have an issue with seeing the replies. My PL tried 3 different browsers and had the same problem. We think it is something with our setup (which will be impossible to change) so please bear with me. Anyone got any suggestions? Also, is there any other documentation available explaining how to do on mainframe? Found MIME and SMTP internet articles but aren't specific enough for my scenario. Thanks for any help!!

HELO JOBTRAC
MAIL FROM:<sender@xxxx.ORG>
RCPT TO:<receiver@xxxx.ORG>
DATA
SUBJECT: subject
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"

--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="REPORT1.TXT"

// DD DISP=SHR,DSN=WS.TSTW.REPORT1
// DD *
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="REPORT2.TXT"

// DD DISP=SHR,DSN=WS.TSTW.REPORT2
// DD DISP=SHR,DSN=MT.TDOC.TRAILING.PERIOD
/*
//*
//OF1 DD DSN=WS.TDOC.ACS.EMAIL.CONSTRUC,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(200,(1,1),RLSE),AVGREC=K,
// RECFM=VB,LRECL=200
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IF1) OUTFILE(OF1)

Error
IDCAMS SYSTEM SERVICES

REPRO INFILE(IF1) OUTFILE(OF1)
IDC3302I ACTION ERROR ON S17078D.S17078D1.JOB03242.D0000102.?
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN
IDC31467I MAXIMUM ERROR LIMIT REACHED.
IDC0005I NUMBER OF RECORDS PROCESSED WAS 126
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
phow0906
 
Posts: 9
Joined: Wed Sep 22, 2010 11:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Multiple Attachments in Email

Postby Robert Sample » Mon Sep 27, 2010 7:14 pm

You may be running into a site limitation -- for which only your site support group can provide assistance.

Instead of dumping the data to a file, have you tried going straight to SMTP to ensure the email is properly handled? If not, that would be the first step. If you cannot do such a test, your only option will be to work with your site support group to resolve the issue.

Are you looking at the RFC specifications on the Internet or some article? Look at (Google is your friend) RFC 2821, 2822, 2045, 2046, 2047, 2048, 2049 for starters. These provide exact and precise details about the format of SMTP messages as well as MIME-encoded SMTP messages.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Multiple Attachments in Email

Postby phow0906 » Mon Sep 27, 2010 7:41 pm

I can type in text and it will send correctly. But when I put in the DSNs it will not go (and very small files). Each file will go separately though but not when try to send together. I'm afraid we have not had much positive response from our site people on this issue. That is why my PL and I have had to get help elsewhere. Yes I have been looking at the RFC on internet but was hoping I could find something more specific on using the DSNs on the mainframe to do this. Thanks for your ideas and help!
phow0906
 
Posts: 9
Joined: Wed Sep 22, 2010 11:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Multiple Attachments in Email

Postby Robert Sample » Mon Sep 27, 2010 8:29 pm

You are making all the data sets have the same LRECL, right? If not, that alone could cause you problems. The job stream I posted on Wednesday September 22nd is known to work -- I ran it Wednesday to confirm before posting. It produced a single email with two attachments named test1.txt and test2.txt as per the job stream.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Multiple Attachments in Email

Postby phow0906 » Mon Sep 27, 2010 8:37 pm

I just verified that the LRECL are the same. My PL was able to get to your code through his laptop on Friday and copy it. I put in a new jcl, ran it and it didn't work for me. Only first attachment went and got the error posted. I know it has to be something I am doing wrong. There isn't any expertise on this here for help, which is making this project very difficult. I do appreciate all your help and responses!
phow0906
 
Posts: 9
Joined: Wed Sep 22, 2010 11:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Multiple Attachments in Email

Postby dick scherrer » Mon Sep 27, 2010 11:07 pm

Hello,

When you ran the process Robert posted, what was in the informational/diagnostic output (this could be in multiple sysouts)?

Posting this may help someone here help you.

You might also try your sort instead of idcams. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post