View previous topic :: View next topic
|
Author |
Message |
rashmi123
New User
Joined: 04 Jun 2007 Posts: 25 Location: Pune
|
|
|
|
Hi - I am using SMTP to email a mainframe seq dataset of 300 bytes as an attachment(RTF document). I am successfully able to send the email but when I open the RTF document the first 7 lines are missing. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You're not going to get very far with this topic if you don't provide WAY more details:
- What software are you using to create the .rtf format?
- What software are you using to prep and create the SMTP data stream?
- Does that software provide manuals/diagnostics/troubleshooting or technical support? What does your internal tech support guys say?
- Where those missing 7 lines present in the data before sending it? What proof is there that they've actually been dropped? How do we know that your email server is not responsible for this issue?
- Does this process work correctly with other data? If so, what's different about this? |
|
Back to top |
|
|
rashmi123
New User
Joined: 04 Jun 2007 Posts: 25 Location: Pune
|
|
|
|
Wowwwww!!!!Thats a lot of questions!!!!!! Let me try answering a few ....
I am using IEBGENER in a mainframe job to accomplish this. I looked at the previous posts of how to send attachments thru email from mainframe.
Following is the code -
Code: |
HELO JOBTRAC
MAIL FROM:<ABC@XYZ.COM>
RCPT TO:<ABC@XYZ.COM>
DATA
FROM: <ABC@XYZ.COM>
TO: <ABC@XYZ.COM>
SUBJECT: test mail
Mime-Version: 1.0
Content-Type: multipart/mixed; "simpleboundary"
Attached is the Changeman report that lists all the packages and
components to be installed.
--simpleboundary
Content-Type: text/html; charset="us-ascii"
Content-Type: application/octet-stream; name="xyzz.xls"
|
My JCL is something like this -
Code: |
//JS00010 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP),LRECL=300
//SYSUT1 DD DISP=SHR,DSN=ABC.SQ.EMLSCRPT
// DD DISP=SHR,DSN=ABC.CHGMAN.RVWRPT
//*
|
The email worked fine. But I noticed that for this particular sequential file the first 7 lines are skipped and the first line of the attachment is actually the 8th line in the sequential dataset.[/code] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
1. Your original post says you're sending an RTF attachment. You DO realize that in order to send RTF text, you must create the RTF text? Merely indicating something is RTF in SMTP does not make it RTF.
2. Your MIME indicates you are sending html text, which is not RTF text.
3. Your MIME also indicates you are sending .XLS data -- which, again, requires software on the mainframe to create since .XLS data has a very specific format and merely calling a file .XLS does not mean it is.
4. Your posting includes two CONTENT-TYPE and no CONTENT-DISPOSITION so who knows how the MIME is being interpreted by SMTP?
You would be wise to start by sending a plain text attachment and getting the MIME statements correct to do so before attempting any non-text (or RTF) attachments. It is quite possible that your incorrectly formatted MIME statements are causing the problem you are seeing. |
|
Back to top |
|
|
rashmi123
New User
Joined: 04 Jun 2007 Posts: 25 Location: Pune
|
|
|
|
Thanks Bob! How do we create an RTF Text??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Where do you see "Bob"? Robert is preferred.
To create an RTF text file you must run something that generates such output.
If your system has SAS, this may be a way for you to create this. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
I tried sending a plain PS file as .rtf attachment in email and it works fine without pre-formatting rtf document.
I understand that RTF and .xls files can be built using SAS ODS, but I think a plain PS file can be sent as .rtf without formatting it.
If we create a sample notepad file in desktop and save it
then rename it as .rtf and open it again, we are still able to see the correct sample text in wordpad. Windows does some translation maybe.
mmm.. IDK
Below are the statements I tried,
Code: |
HELO SMTP
MAIL FROM:<vasanth...@go.com>
RCPT TO: <vasanth...@go.com>
DATA
FROM: vasanth...@go.com
TO: vasanth...@go.com
SUBJECT: Attached is the generated report
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/RICH TEXT;
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=JOBNAMES.RTF
sample test report........
just plain text with no .rtf control statements
|
The LRECL of the file which I was sending is 133, so some text got split into 2 lines, other than that, the contents were consistent.
Warm Regards, |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yup, sending a text file and nameing it .rtf still sends the text file. It does not "become" a real rtf file as far as i know.
Also, some folks create a delimited text file (tab, comma, etc) and call it an .xls file. It is not really a spreadsheet (.xls), but Excel will successfully open this. |
|
Back to top |
|
|
rashmi123
New User
Joined: 04 Jun 2007 Posts: 25 Location: Pune
|
|
|
|
Thanks everyone!!
Regards
Rashmi |
|
Back to top |
|
|
|