View previous topic :: View next topic
|
Author |
Message |
apvardhini
New User
Joined: 23 Apr 2009 Posts: 20 Location: India
|
|
|
|
Email Attachment with record length greater than 80
hi,
Can anyone help me with the below?
I need to a send a report of record length 133 (not attachment) via email from Mainframes. I used the following JCL
Code: |
//SENDNOTE EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP),LRECL=133
//SYSUT1 DD DSN=FISTL.SYS.EMAIL.HEADER,DISP=SHR
// DD *
SUBJECT: DAILY ISSUE FILE REPORT
DAILY ISSUE FILE REPORT
/*
// DD DSN=FISTL.EMAIL.DISSUE.REPORT,DISP=SHR
|
Initially, The reocrd length of FISTL.SYS.EMAIL.HEADER was 80 and that of FISTL.EMAIL.DISSUE.REPORT was 133. when I executed the JCl, I got Maxcc 12. So I changed the record length of FISTL.SYS.EMAIL.HEADER to 133 and tried executing. Now its processing fine but I did not receive any mail.
Is there a way to send a mail with record length more than 80 using IEBGENER? Please help. If this is already posted in the forum, please point me to it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Instead of using DD *, put the data into a file that is LRECL 133 and add that to the concatenation. |
|
Back to top |
|
|
apvardhini
New User
Joined: 23 Apr 2009 Posts: 20 Location: India
|
|
|
|
Robert,
Thank you for the reply. But stil I am not getting the mail though the JCl works fine. Below the content of the header file.
Quote: |
HELO MVSHOST
MAIL FROM:<xxx@abc.com>
RCPT TO:<xyz@abc.com>
RCPT TO:<xxx@abc.com>
DATA
FROM: xxx@abc.com
TO: xyz@abc.com
CC: xxx@abc.com
SUBJECT: DAILY ISSUE FILE REPORT
DAILY ISSUE FILE REPORT
|
Once I read from the same forum that only if the file is of record length 80, we will receive the mail, but I am not 100% sure. Can you help? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The email record length can be anywhere up to 998 and the email works fine -- we've sent emails with 998 LRECL in the past. However, you've got three files in your concatenation, and they are not defined consistently. Fix the consistency issue, your email should be sent, as long as there are no other issues.
RFC 2822 defines email format and it specifically states emails lines up to 998 characters (plus a carriage return and line feed for a total of 1000 bytes) are valid. Google RFC 2822 for more details. |
|
Back to top |
|
|
apvardhini
New User
Joined: 23 Apr 2009 Posts: 20 Location: India
|
|
|
|
I have only two files(Header and report) and their record length is 133 and format is FBA. I saw the documentation you mentioned, but still I could not figure out why I am not getting any mails. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
//SYSUT1 DD DSN=FISTL.SYS.EMAIL.HEADER,DISP=SHR <=== FILE 1
// DD * <=== FILE 2
SUBJECT: DAILY ISSUE FILE REPORT
DAILY ISSUE FILE REPORT
/*
// DD DSN=FISTL.EMAIL.DISSUE.REPORT,DISP=SHR <=== FILE 3 |
You have 3 files as shown here. The first and third might be FBA, 133 bytes but the second is FB, 80 bytes and concatenation of records that do not have like characteristics tends not to work very well. |
|
Back to top |
|
|
apvardhini
New User
Joined: 23 Apr 2009 Posts: 20 Location: India
|
|
|
|
I have given the SUBJECT line and the next line into the HEADER file (FISTL.SYS.EMAIL.HEADER) itself. |
|
Back to top |
|
|
|