View previous topic :: View next topic
|
Author |
Message |
deepag02
New User
Joined: 23 Jul 2007 Posts: 20 Location: India
|
|
|
|
Hi All,
I need to send a flat file having variable record length which can be a maximum of 2000 as an attachment by Email.I had used the following job
//STEP1 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(M,SMTP)
//SYSUT1 DD *
HELO MAILTST1
MAIL FROM:<mymail@domian.com>
RCPT TO:<group@domain.com
DATA
SUBJECT: : Error queue - Messages ready for manual processing
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
Hi All,
Please find the attached messages for manual reprocessing till 9:15 AM
extrcted today.
Please ignore the attachment with the name 'ATT'.
Please let me know in case you need more details.
Regards,
deepa
--DELIMITER
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="Error_Messages.TXT"
CONTENT-TYPE: TEXT/HTML
// DD DISP=SHR,DSN=input.variable.file
// DD *
--DELIMITER
.
QUIT
//*
This Job is working fine for a record length of 80 but anything more this its giving me error
the error i get is
DATA SET UTILITY - GENERATE
WER171A CONCAT DS, LRECLS NE OR RECFMS DIFF
SYNCSORT COPY FEATURE CALLED - RC = 12
I had changed the attributes (i also tried giving RECFM explicitly) as follows still i was getting this error
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *,LRECL=630
HELO MAILTST1
MAIL FROM:<mymail@domain.COM>
RCPT TO:<group@domain.COM>
DATA
SUBJECT: Error queue - Statistics
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
Hi All,
Please find the attached statistics for error queue till 9:15 AM
extracted today.
Please ignore the attachment with the name 'ATT'.
Please let me know in case you need more details.
Regards,
deepa
--DELIMITER
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="Error_Statistics.TXT"
CONTENT-TYPE: TEXT/HTML
// DD DISP=SHR,DSN=input.variable.file
// DD *
--DELIMITER
.
QUIT
/*
//SYSUT2 DD SYSOUT=(M,SMTP),LRECL=630
//SYSIN DD DUMMY
Could u please let me know
1.if there are some attributes which i can change so that i can attach a file having record length >80, also if it will work for a variable length file.
2.If its not possible then if its due to the limitation imposed by IEBGENER or SMTP
Thanks in advance,
Deepa |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Instead of using instream data, create new dataset and put all your mail text from instream data into a dataset.
//SYSUT1 DD DSN=HLq1.hlq2... |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Agree with Devzee.
I guess that even though you give an LRECL parameter, the instream data length remains the same - the LRECL of ht JCL. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
What is so hard to understand about the concept that concatenated FB datasets need to be the same LRECL? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Go easy Kevin, I ran into the same problem a couple week back....133 byte FBA sysout needing to be concatenated to 80 byte email headers....grin....
I've slept since then and if I make it to work tomorrow, I'll relate how I got it to work.....
Some of "us" ask for guidance and some of us experiment first, and then ask (if needed)...... |
|
Back to top |
|
|
deepag02
New User
Joined: 23 Jul 2007 Posts: 20 Location: India
|
|
|
|
Thank you Devzee.It worked and i was able to send records with length greater than 80 but now its getting truncated at 999.Is there any such limitation?
this was the JCL i had used
//STEP1 EXEC PGM=IEBGENER,COND=(0,NE)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=OFRT.SMTP.STATMENT.F1000,disP=SHR
// DD DSN=OFRT.MAIL3.TESTFILE.D0723,DISP=SHR
// DD DSN=OFRT.MIME.CLOSING.F1000,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTPROC),LRECL=1000
content of OFRT.SMTP.STATMENT.F80
HELO MAILTST1
MAIL FROM:<mymail@domain.COM>
RCPT TO:<group@domain.COM>
DATA
SUBJECT: : ERROR QUEUE - MESSAGES READY FOR MANUAL PROCESSING
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;"SIMPLE BOUNDARY"
HI ALL,
PLEASE FIND THE ATTACHED MESSAGES FOR MANUAL REPROCESSING TILL 9:15 AM
EXTRCTED TODAY.
PLEASE IGNORE THE ATTACHMENT WITH THE NAME 'ATT'.
PLEASE LET ME KNOW IN CASE YOU NEED MORE DETAILS.
REGARDS,
deepa
--SIMPLE BOUNDARY
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="ERROR_STATISTICS.TXT"
CONTENT-TYPE: TEXT/PLAIN
OFRT.MAIL3.TESTFILE.D0723 is the file i would like to send as attatchment
contents of OFRT.MIME.CLOSING.F80
--SIMPLE BOUNDARY--
THIS IS THE EPILOGUE.IT IS ALSO TO BE IGNORED
What would be the maximum attachment size that i can use while sending mail via MF also for the above JCl when i tried sending a 2000 record length file it gave me a delivery failure notification stating that '
this message has been rejected by the Exchange organization to which it was sent, because the message contains either a large number of attachments or because there are too many nested attachments. To solve this problem, reduce the number of attachments or nested attachments, and resend the message'.in every other case is when the record length was less than 1000 there was only 2 attachments one with ATT and the other was the file.What could be the problem?
thanks in advance,
deepa. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Is the file coming through as an attachement or is it being concatenated to the actual message?
One of the many RFCs for email states that each line can not exceed 1000 bytes. If the file is a true attachment this should not be a problem. If the file is being concatenated to the message which it looks like it is, you have hit the limit of Internet mail at 1000 bytes. You need to send it as binary data in an attachement or not send records of width 2000. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
Back to top |
|
|
deepag02
New User
Joined: 23 Jul 2007 Posts: 20 Location: India
|
|
|
|
Thank you Stodolas, but the file is being sent as an attatchment to the mail and i am receiving a mail with the file attached with the record truncated at 999.
thanks in advance,
deepa. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
What about the possiblity of zipping the attachment and sending as a binary MIME type? Being a text/anything may truncate at 999 just like the contents on the message. Check the RFC on mail attachments. I don't know if it is in 821. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
Back to top |
|
|
deepag02
New User
Joined: 23 Jul 2007 Posts: 20 Location: India
|
|
|
|
Hi all,
Thanks a tonn for all your help i was able to send the mail but not with attachment greater than 999. One more doubt i have is when i send the mail i am getting another attachment with 'ATT' name how does this attachement get generated?
Thanks in advance
Deepa. |
|
Back to top |
|
|
|