Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Email Attachment with record length greater than 80

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
deepag02

New User


Joined: 23 Jul 2007
Posts: 20
Location: India

PostPosted: Mon Jul 23, 2007 11:27 am    Post subject: Email Attachment with record length greater than 80
Reply with quote

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
View user's profile Send private message

Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Jul 23, 2007 11:31 am    Post subject:
Reply with quote

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
View user's profile Send private message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Tue Jul 24, 2007 12:14 am    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Jul 24, 2007 1:07 am    Post subject: Re: Email Attachment with record length greater than 80
Reply with quote

What is so hard to understand about the concept that concatenated FB datasets need to be the same LRECL?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jul 24, 2007 1:33 am    Post subject:
Reply with quote

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
View user's profile Send private message
deepag02

New User


Joined: 23 Jul 2007
Posts: 20
Location: India

PostPosted: Tue Jul 24, 2007 4:55 pm    Post subject: Re: Email Attachment with record length greater than 1000
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jul 24, 2007 6:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jul 24, 2007 6:54 pm    Post subject:
Reply with quote

RFC 821, Section 4.5.3:

http://www.freesoft.org/CIE/RFC/821/24.htm
Back to top
View user's profile Send private message
deepag02

New User


Joined: 23 Jul 2007
Posts: 20
Location: India

PostPosted: Wed Jul 25, 2007 1:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jul 26, 2007 7:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jul 26, 2007 8:08 pm    Post subject:
Reply with quote

See section 3 here: http://www.cs.utk.edu/~moore/mime-style.html

That confirmed my thoughts. As long as you are attaching it as a text/plain or text/html or text/.... if your lines are longer than 1000 it is the
sender's responsibiltiy to wrap the long lines.

Also see: http://search.cpan.org/~eryq/MIME-tools-6.200_02/lib/MIME/Tools/primer.pod
8-bit encoding only allows for 1000 bytes in a line

Try adding Content-Transfer-Encoding: Binary to your outbound mail header.
Back to top
View user's profile Send private message
deepag02

New User


Joined: 23 Jul 2007
Posts: 20
Location: India

PostPosted: Mon Sep 10, 2007 4:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us