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

First 7 lines not being copied when using SMTP


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmi123

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Tue Feb 08, 2011 2:41 am
Reply with quote

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

Global Moderator


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

PostPosted: Tue Feb 08, 2011 3:03 am
Reply with quote

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

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Tue Feb 08, 2011 3:31 am
Reply with quote

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

Global Moderator


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

PostPosted: Tue Feb 08, 2011 6:05 am
Reply with quote

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

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Tue Feb 08, 2011 9:25 am
Reply with quote

Thanks Bob! How do we create an RTF Text???
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: Tue Feb 08, 2011 10:31 am
Reply with quote

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Feb 08, 2011 11:33 am
Reply with quote

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

Moderator Emeritus


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

PostPosted: Tue Feb 08, 2011 11:37 am
Reply with quote

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

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Wed Feb 09, 2011 11:10 am
Reply with quote

Thanks everyone!!

Regards
Rashmi
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts JCL - To repeat a string in same colu... JCL & VSAM 2
Search our Forums:

Back to Top