Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
First 7 lines not being copied when using SMTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: First 7 lines not being copied when using SMTP
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

Moderator Team Head


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

PostPosted: Tue Feb 08, 2011 3:03 am    Post subject: Reply to: First 7 lines not being copied when using SMTP
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    Post subject: Reply to: First 7 lines not being copied when using SMTP
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: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Tue Feb 08, 2011 6:05 am    Post subject:
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    Post subject: Reply to: First 7 lines not being copied when using SMTP
Reply with quote

Thanks Bob! How do we create an RTF Text???
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Feb 08, 2011 10:31 am    Post subject:
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: 1521
Location: Chennai

PostPosted: Tue Feb 08, 2011 11:33 am    Post subject:
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

Site Director


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

PostPosted: Tue Feb 08, 2011 11:37 am    Post subject:
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    Post subject: Reply to: First 7 lines not being copied when using SMTP
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
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
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Mail via SMTP with an image? Mike 1304 JCL & VSAM 4 Thu Jan 26, 2017 2:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us