Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Multiple attachments with IEBGENER

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Thu Jul 22, 2010 5:50 pm    Post subject: Multiple attachments with IEBGENER
Reply with quote

Hi,
I have to send e-mails with multiple attachments. It worked with with single attachment but not working for multiple. This is what I have tried

Code:

//EMAIL22  EXEC  PGM=IEBGENER                                         
//SYSPRINT DD  SYSOUT=*                                               
//SYSIN    DD  DUMMY                                                 
//SYSUT2   DD  SYSOUT=(2,SMTP)                                       
//SYSUT1   DD  *
 HELO  MASTER                 
 MAIL FROM: <IDM@ABC.com>
 RCPT TO:   <IDM@ABC.com>
DATA                         
SUBJECT: LIST OF ELEMENTS IN TEST1 - REPORT<EOM>         
MIME-VERSION: 1.0                                           
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"   
--SIMPLE BOUNDARY                                           
CONTENT-TYPE: TEXT/PLAIN                                     
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST1_COBB.TXT 
//    DD  DISP=SHR,DSN=A.B.C.1  (data for first att)
 --SIMPLE BOUNDARY                                           
 CONTENT-TYPE: TEXT/PLAIN                                     
 CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST1_COBB_2.TXT
//    DD  DISP=SHR,DSN=A.B.C.2 (data for second att)
 --SIMPLE BOUNDARY               
//    DD  DISP=SHR,DSN=A.B.C.3 (period operator on rowXcol (1x1) and nothing else)

The MAX CC is 0, but I am not getting any mails to the mentioned id.

NOTE: I have changed the e-mail ids and data set names in this post. I confirm they do not have any spelling mistakes and are valid.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 22, 2010 5:57 pm    Post subject:
Reply with quote

Search the Froum for "attachment" and author as "Robert Sample" you'll get enough hits to work with.
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Thu Jul 22, 2010 6:02 pm    Post subject:
Reply with quote

Yes Anuj, the piece of code for multiple attachments was taken from his post. The job is completed with RC 0 but mail is not triggered.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 22, 2010 6:56 pm    Post subject:
Reply with quote

If you can look at the SMTP started task, see what messages, if any, appear when you submit the job. If you cannot look at the output, you will need to get your site support group to look at the output for you.

One possibility is to add the parameter DEBUG to your SMTP configuration file and restart SMTP. This provides detailed information about what is going back and forth with SMTP. Your site support group would have to do this but it can be very beneficial in resolving issues as SMTP is not very explicit as to problems.

I do note one difference between my post and yours -- I had blank lines in certain spots. IIRC, those blank lines are not optional. You might try adding them to see if you get better results.
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Fri Jul 23, 2010 7:36 pm    Post subject:
Reply with quote

yes I observed the blank lines after the CONTENT-DISPOSITION and tested accordingly. But no luck.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Jul 23, 2010 7:59 pm    Post subject:
Reply with quote

Just an observation:
Robert's sample also specified FROM: and TO: designators between the DATA and SUBJECT lines, which you did not do
Code:
DATA
FROM:     MAINFRAME@XXX.COM
TO:       ROBERT.SAMPLE@XXX.COM
SUBJECT:  TEST ATTACHMENT

Perhaps those statements are important to a successful operation?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 24, 2010 1:00 am    Post subject:
Reply with quote

I tested with your JCL and got it running as follows:
Code:
 HELO  MASTER                 
 MAIL FROM: <IDM@ABC.com>
 RCPT TO:   <IDM@ABC.com>
DATA                         
SUBJECT: LIST OF ELEMENTS IN TEST1 - REPORT<EOM>         
MIME-VERSION: 1.0                                           
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"   
--SIMPLE BOUNDARY                                           
CONTENT-TYPE: TEXT/PLAIN                                     
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST1_COBB.TXT

//    DD  DISP=SHR,DSN=A.B.C.1  (data for first att)
//    DD  *
--SIMPLE BOUNDARY                                           
CONTENT-TYPE: TEXT/PLAIN                                     
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST1_COBB_2.TXT

//    DD  DISP=SHR,DSN=A.B.C.2 (data for second att)
//    DD  DISP=SHR,DSN=A.B.C.3 (period operator on rowXcol (1x1) and nothing else)
The four specific changes that were required to get it working were:
1. Added blank line after CONTENT-DISPOSITION (no, I don't know why this is required but it doesn't seem to work without the blank line)
2. Made sure all data started in column 1 -- you had --SIMPLE BOUNDARY starting in column 2, which didn't work for me
3. You were missing some // DD * lines to indicate the concatenation; otherwise, SYSIN is assumed and duplicated within the step -- not a good thing.
4. Removed final --SIMPLE BOUNDARY before the trailing period -- I thought it was needed but mine ran without it.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us