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

Moving a PS file as body of a mail!


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

New User


Joined: 04 Sep 2017
Posts: 43
Location: India

PostPosted: Tue Nov 21, 2017 9:23 pm
Reply with quote

Hi all,

I need to send a mail with the contents of PS file (record length 80 and FB) as the body of mail.

I have coded the following:

Code:

//MAIL     EXEC PGM=IEBGENER                         
//OUTPUT   DD SYSOUT=*                               
//SYSIN    DD DUMMY                                   
//SYSUT1   DD DSN=CARD(card01),DISP=SHR 
//         DD DSN=file1,DISP=SHR
//SYSUT2   DD SYSOUT=(B,ZSPTCPM)                     
//SYSOUT   DD  SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               


In the card I used:

Code:

HELO SYSA                           
MAIL FROM:<abc@gmail.com>
RCPT TO:<xyz@gmail.com> 
DATA                                 
SUBJECT:  TEST MESSAGE FROM MAINFRAME


I am able to send mail. But the mail is balnk i.e It does mot have a subject, from and to info...Just the body of the mail is present which is the contents in the PS file.

Could you please give me a solution to send mail with all details!

Thanks!
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1693
Location: Tiruppur, India

PostPosted: Tue Nov 21, 2017 11:17 pm
Reply with quote

You need additional SMTP tags, like below

Code:
HELO SYSA                                     
MAIL FROM:<WELLS@DANKMEMES.COM>     
RCPT TO:<WELLS@DANKMEMES.COM>       
RCPT TO:<WELLS@DANKMEMES.COM>       
DATA                                             
From:<WELLS@DANKMEMES.COM>               
To:<WELLS@DANKMEMES.COM>             
Cc:<WELLS@DANKMEMES.COM>             
Subject: Dank memes are ready                   
MIME-Version: 1.0
Back to top
View user's profile Send private message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 43
Location: India

PostPosted: Wed Nov 22, 2017 6:48 pm
Reply with quote

Thanks Vasanthz,

I tried adding the SMTP tags as suggested. Still I am getting a blank mail.

Please suggest me any way to solve this!

Thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Nov 22, 2017 7:10 pm
Reply with quote

I don't suppose that you had thought of telling us what the log says, or even better posting the log so that we may see

Your code is also a good help for those that wish to help
Back to top
View user's profile Send private message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 43
Location: India

PostPosted: Wed Nov 22, 2017 8:08 pm
Reply with quote

Hi all,

I changed HELO SYSA - SYSA to our system and now the mail has been genearted successfully.

Thank you all for reply!

Regars!
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 To pull the file with Date and Time u... TSO/ISPF 16
No new posts regarding COBOL WRITE verb (VB File H... COBOL Programming 6
No new posts COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Compare 2 files replace data in 1st f... DFSORT/ICETOOL 4
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
Search our Forums:

Back to Top