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

Code to SMTP a CSV file in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maruniral

New User


Joined: 11 Sep 2007
Posts: 12
Location: India

PostPosted: Tue Oct 16, 2007 6:09 pm
Reply with quote

I'm using the following code to send a CSV file:

Code:

//SENDNOTE EXEC PGM=IEBGENER                                         
//SYSIN    DD DUMMY                                                   
//SYSPRINT DD SYSOUT=*                                               
//SYSUT2   DD SYSOUT=(A,SMTP)                                         
//SYSUT1   DD *                                                       
HELO MVSHOST                                                         
MAIL FROM:<Niral.X.Maru@xxx.COM>                                 
RCPT TO:<Niral.X.Maru@xxx.COM>                                 
DATA                                                                 
FROM:   <Niral.X.Maru@xxx.COM>                                 
TO:       <Niral.X.Maru@xxx.COM>                                 
CC:      <Niral.X.Maru@xxx.COM>                                 
SUBJECT:  MW Attendance Report - TEST MAIL FROM MAINFRAME             
MIME-Version: 1.0                                                     
Content-type: multipart/mixed;                                       
              boundary="<< boundary_identifier >>"                   
--<< boundary_identifier >>                                           
Content-Type: Text/plain; charset="us-ascii"                   
Content-Transfer-Encoding: 7bit                                 
Niral,                                                         
                         
       This is a test email from mainframe to send attachements
       along with the body of the message.                     
       Please find the same.                                   
Best Regards!                                                   
Niral                                                           
--<< boundary_identifier >>                                     
Content-Type: text/html; charset="us-ascii"                     
Content-Type: application/octet-stream; name="status.csv"   
Content-Transfer-Encoding: 7bit                                 
/*                                                             
//         DD DSN=HL.TEST.DATA,DISP=SHR                   
//         DD *                                                 
--<< boundary_identifier >>                                     


My file is a "," seperated file. Problem is that i dont get a proper file (it comes as blanks) when i send it in a comma seperated format.

It i remove the comma seperation then i get the data properly. Can someone explain whats wrong.
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 Oct 16, 2007 8:34 pm
Reply with quote

Hello,

Is the dcb information for both files the same or are they of different formats?
Back to top
View user's profile Send private message
maruniral

New User


Joined: 11 Sep 2007
Posts: 12
Location: India

PostPosted: Tue Oct 16, 2007 8:41 pm
Reply with quote

Its the same. I think if u have diff information then it would give you an error.
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 Oct 16, 2007 8:53 pm
Reply with quote

This is an odd one. Since commas are common characters, I find it hard to believe that their presence or absence in the data has any relevance. The resolution, if one can be determined, will prove interesting.
Back to top
View user's profile Send private message
maruniral

New User


Joined: 11 Sep 2007
Posts: 12
Location: India

PostPosted: Tue Oct 16, 2007 10:14 pm
Reply with quote

yeah i too find it a lil weird that bcause of a comma its not working....can you try it at ur end with some test file and see if the same issue persists ??
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top