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
 

 

Code to SMTP a CSV file in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Code to SMTP a CSV file in JCL
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

Site Director


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

PostPosted: Tue Oct 16, 2007 8:34 pm    Post subject:
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    Post subject: Reply to: Code to SMTP a CSV file in JCL
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

Moderator Team Head


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

PostPosted: Tue Oct 16, 2007 8:53 pm    Post subject: Reply to: Code to SMTP a CSV file in JCL
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    Post subject: Reply to: Code to SMTP a CSV file in JCL
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    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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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