IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Email with attachment


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Wed Aug 26, 2009 3:10 pm
Reply with quote

Hi,

We have two mainframes at our site.
1. My company's mainframes
2. Client mainframes

In out site, JCL using IEBGENER is working fine to send email with attachment.

I've copy pasted the same thing in client mainframes and just changed the node ( which i got it by issuing the commadn TASID). Max cc = 0, but no mail has come to my id.

There is a difference in SYSPRINT in both mainframes.
working code's SYSPRINT
Code:

DATA SET UTILITY - GENERATE                                           
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT
                                                                     
PROCESSING ENDED AT EOD                                               


client mainframe's SYSPRINT

Code:


1ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                               
 ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
 ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 19:32 ON WED AU
0          OPTION COPY,MSGDDN=SYSPRINT,SORTIN=SYSUT1,SORTOUT=SYSUT2             
 ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
 ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE   E5-K44563
 ICE193I 0 ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED   
 ICE088I 0 D289119A.STEP1   .        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
 ICE093I 0 MAIN STORAGE = (MAX,6291456,6278910)                                 
 ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)                         
 ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
 ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=3145728,MINLIM=450560,EQUALS=N,LIST=Y,ER
 ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
 ICE130I 0 OPTIONS: RESALL=65536,RESINV=65536,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y
 ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
 ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=Y,TEXIT=Y,LISTX=N,EFS=NONE    ,EXIT
 ICE133I 0 OPTIONS: HIPRMAX=10     ,DSPSIZE=10  ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAM
 ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
 ICE084I 0 BSAM ACCESS METHOD USED FOR SYSUT2       
 ICE084I 0 BSAM ACCESS METHOD USED FOR SYSUT1       
 ICE751I 1 EF-K10929 F0-K30362 E8-K44563             
 ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
 ICE055I 0 INSERT 0, DELETE 0                       
 ICE054I 0 RECORDS - IN: 9, OUT: 9                   
 ICE052I 0 END OF DFSORT                             


Please help me in finding out the mistake

Many thanks in advance
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 26, 2009 8:40 pm
Reply with quote

Hello,

The client mainframe uses sort for IEBGENER executions that simply copy.

This is not a mistake.

You should talk with the network support people who support the client environment and ask how that system supports sending e-mail from the mainframe.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Wed Aug 26, 2009 9:16 pm
Reply with quote

I faced this situation long time back and i did two changes one i looked into some existing e-mail file which was used in my client's machine and i replaced with ICEGENER utility. It woked for me icon_smile.gif

Also make sure
Code:
//SYSUT1   DD DSN=SSYG.USER.SELECD.CUS.MIN.EMAIL,DISP=SHR 
//         DD DSN=SSYG.USER.SELEC.CPS.MIN, disp=shr


With same recl
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 27, 2009 2:56 am
Reply with quote

Hello,

Quote:
It woked for me
Because the situations are/were different. . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 27, 2009 3:30 am
Reply with quote

Possible problem 1: the SMTP started task on the client machine may not be the same as on your machine, which would prevent the email from being sent out -- you need to confirm with the client about the SMTP started task name

Possible problem 2: even if the SMTP started task name is the same, the client may have their mail server set up not to send certain emails (above a particular size, for example). You need to confirm with the client about any restrictions on their emails from their mainframe.

Using SORT instead of IEBGENER will have no impact on the sending of the email -- they both copy the data from SYSUT1 to SYSUT2. Concentrate on the real differences between the machines since the one you singled out will not prevent emails from going out. A good thing to look at would be a sample email job that the client is running now to see the differences.
Back to top
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Thu Aug 27, 2009 11:40 am
Reply with quote

Quote:

A good thing to look at would be a sample email job that the client is running now to see the differences.


I tried to send a simple mail from the client mainframes it worked for me. But i had to do a small change.

instead of SMTP, I used TCPSMTP.

Code:

//SYSUT2   DD  SYSOUT=(B,TCPSMTP)


I dinn change anything in the node it is still the node that i got from TASID command.

But when i used the JCL to send attachments, I am not getting the desired results.

here is the JCL

Code:

//D289119A JOB (DPFACS7000),'EMAIL',MSGCLASS=X,CLASS=B,NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEBGENER                                             
//SYSUT1 DD DSN=AAAA.BBBB.MIME,DISP=SHR                       
//       DD DSN=AAAA.BBBB.ATTCHMNT,DISP=SHR             
//SYSUT2 DD SYSOUT=(B,TCPSMTP)                                       
//SYSIN DD DUMMY                                                     
//SYSOUT DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                               
//                                                                   


AAAA.BBBB.MIME

Code:

HELO F0JES2                                                   
MAIL FROM:<KRANTHIKUMAR_B@INFOSYS.COM>                       
RCPT TO:<KRANTHIKUMAR_B@INFOSYS.COM>                         
DATA                                                         
FROM:<KRANTHIKUMAR_B@INFOSYS.COM>                             
TO:<KRANTHIKUMAR_B@INFOSYS.COM>                               
SUBJECT: Test attachment                                     
MIME VERSION: 1.0                                             
Content-type: multipart/mixed; boundary="simple SMTP boundary"
                                                             
--simple SMTP boundary                                       
Content-type: text/plain;charset=us-ascii                     
Content-transfer-Encoding: 7bit                               
                                                             
Please find the attached document                             
                                                             
--simple SMTP boundary                                       
Content-type: text/plain;name=report.doc;charset=us-ascii     
Content-transfer-Encoding: 7bit                     
Content-disposition: attachment;filename=report.doc
                                                   


Content of the attachment

TEST DATA FOR ATTACHMENT

Email
[img]
MIME VERSION: 1.0
Content-type: multipart/mixed; boundary="simple SMTP boundary"

--simple SMTP boundary
Content-type: text/plain;charset=us-ascii
Content-transfer-Encoding: 7bit

Please find the attached document

--simple SMTP boundary
Content-type: text/plain;name=report.doc;charset=us-ascii
Content-transfer-Encoding: 7bit
Content-disposition: attachment;filename=report.doc

TEST DATA FOR ATTACHMENT
[/img]
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 27, 2009 4:49 pm
Reply with quote

Quote:
instead of SMTP, I used TCPSMTP.
This is the started task name I referred to as possible problem #1.

In what you've shown, I do not see the last line with the period that is required under the RFC for the email to be sent. Create file AAAA.BBBB.PERIOD with the same DCB as the other files, edit it to have a period in column 1 of the only line in the file, and change your JCL to
Code:
//SYSUT1 DD DSN=AAAA.BBBB.MIME,DISP=SHR                       
//       DD DSN=AAAA.BBBB.ATTCHMNT,DISP=SHR   
//       DD DSN=AAAA.BBBB.PERIOD,DISP=SHR
then let us know the results.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Fri Aug 28, 2009 12:54 am
Reply with quote

Hi,

As mentioned by me and robert, try to have same DCB for all files and try with the below

Code:
HELO F0JES2                                                   
MAIL FROM:<KRANTHIKUMAR_B@INFOSYS.COM>                       
RCPT TO:<KRANTHIKUMAR_B@INFOSYS.COM>                         
DATA
SUBJECT: TEST MAIL                                     
MIME-VERSION: 1.0                                       
CONTENT-TYPE: TEXT/PLAIN                                 
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST.TXT     


Will see if this works.
Back to top
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Fri Aug 28, 2009 12:41 pm
Reply with quote

Hi,

Tried both suggestions, but of no use icon_sad.gif

Code:

HELO F0JES2                                                   
MAIL FROM:<KRANTHIKUMAR_B@INFOSYS.COM>                       
RCPT TO:<KRANTHIKUMAR_B@INFOSYS.COM>                         
DATA
SUBJECT: TEST MAIL                                     
MIME-VERSION: 1.0                                       
CONTENT-TYPE: TEXT/PLAIN                                 
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST.TXT 


Code:

//SYSUT1 DD DSN=AAAA.BBBB.MIME,DISP=SHR                       
//       DD DSN=AAAA.BBBB.ATTCHMNT,DISP=SHR   
//       DD DSN=AAAA.BBBB.PERIOD,DISP=SHR


Also the DCB parameters for all the datasets are same.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 28, 2009 5:32 pm
Reply with quote

It is time to contact the client support group to find out where the problem is. They may have some specialized set up for SMTP that you need to make adjustments to your program for. As I said earlier, getting a job from the client that is sending email on their system right now would give you some better ideas on how your email needs to be structured.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts mail attachment with excel format All Other Mainframe Topics 2
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts Problem while sending special charact... JCL & VSAM 4
No new posts TXT2PDF and then SMTP email a PDF JCL & VSAM 4
Search our Forums:

Back to Top