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

JCL to send email along with formated live data from file.


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

New User


Joined: 13 Jul 2018
Posts: 8
Location: Nederlands

PostPosted: Thu Aug 09, 2018 9:48 am
Reply with quote

Hi ALL,

we got a requirement to send the email, by taking two live values(date) from the files.
I have coded like this (I am unable to attach screen short from my PC, Sorry) :
Code:

//STEP03 EXEC PGM=IEBGENER                                   
//SYSPRINT  DD SYSOUT=*                                       
//SYSUDUMP  DD SYSOUT=P,                                     
//             OUTLIM=1000000                                 
//SYSIN     DD DUMMY                                         
//SYSOUT    DD SYSOUT=*                                       
//SYSUT1    DD *                                             
HELO ACBS                                                     
MAIL FROM:<ABC.COM>                                           
RCPT TO:<XYX.COM>                                             
DATA                                                         
FROM:<ABC.COM>                                               
TO: <XYZ.COM>                                                 
SUBJECT: TEST MAIL                                           
HI TEAM,                                                     
FILES WITH THE DATE                                           
//      DD DSN=TA#S@.CTYGD1.###.TA511O01.PDTA511(-1),DISP=SHR
//      DD *                                                 
ARE DELIVERED TO ABC TEAM WITH DATE AS                       
//      DD DSN=TA#S@.CTYGD1.###.TA511O01.PDTA511(0),DISP=SHR 
//      DD *                                                 
NOTE:THIS IS AN AUTO-GENERATED MAIL.                         
QUIT                                                         
.                                                             
/*                                                           
//SYSUT2    DD SYSOUT=(B,TCPSMTP),OUTLIM=1000000             
//*                                                           
**************************** Bottom of Data ******************


OUTPUT of the code:
Code:

HI TEAM,                                                     
FILES WITH THE DATE                                           
08052018                                                 
ARE DELIVERED TO ABC TEAM WITH DATE AS                       
08072018                                               
NOTE:THIS IS AN AUTO-GENERATED MAIL.                         
QUIT   


Is it possible to format the input structure in above JCL CODE to get Output like (main concern was to get date value to be structured)

Code:

HI TEAM,                                                     

FILES WITH THE DATE 08052018 ARE DELIVERED TO ABC TEAM WITH DATE AS 08072018

NOTE:THIS IS AN AUTO-GENERATED MAIL.                         
QUIT



Thanks in advance.
Have a great time.
Please learn to use the code tags - I have amended your post
Code:
[code] ... put your stuff in here[/code]
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Aug 09, 2018 12:27 pm
Reply with quote

Not without some programming. Simple enough to do in REXX.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Aug 09, 2018 3:34 pm
Reply with quote

Certainly not with JCL. JCL does not touch your data. It does not know anything about your data. It only tells the OS what data sets you want processed by the program(s) specified in the JCL.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Aug 09, 2018 3:52 pm
Reply with quote

This has turned into a Do My Work For Me thread. We do not do this, though I am certain some of the people that respond to these help requests would be happy to assist you in exchange for appropriate compensation.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Aug 09, 2018 4:08 pm
Reply with quote

Use DFSORT or SYNCSORT, perhaps? (whichever you might have)

Generate SYMNAMES for the 'from' and 'to' dates to be used in another step which generates the control cards you currently have as SYSUT1 to IEBGENER with the dates resolved.

The sort product's output from this second step can be put to
Code:
      DD SYSOUT=(B,TCPSMTP),OUTLIM=1000000


Garry.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Thu Aug 09, 2018 7:02 pm
Reply with quote

I don't think you mentioned if the input data sets could be modified. While, as noted, it's pretty simple to modify the email, it might be worth asking if the input data sets can be created in the needed format to begin with.

Just an option. That would depend on things specific to your case. Just thought I'd offer it as something for you to consider.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top