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
 
JCL to send email along with formated live data from file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
wik123

New User


Joined: 13 Jul 2018
Posts: 6
Location: india

PostPosted: Thu Aug 09, 2018 9:48 am    Post subject: JCL to send email along with formated live data from file.
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 User


Joined: 01 Sep 2015
Posts: 252
Location: Denmark

PostPosted: Thu Aug 09, 2018 12:27 pm    Post subject:
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: 2126
Location: UK

PostPosted: Thu Aug 09, 2018 3:34 pm    Post subject: Reply to: JCL to send email along with formated live data from file.
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: 684
Location: The Universe

PostPosted: Thu Aug 09, 2018 3:52 pm    Post subject:
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: 1035
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 09, 2018 4:08 pm    Post subject:
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: 184
Location: USA

PostPosted: Thu Aug 09, 2018 7:02 pm    Post subject: The input could be modified, too.
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    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 MQ-DATA-LENGTH is ZERO on MQGET Daniel Prosser Java & MQSeries 5 Tue Dec 18, 2018 5:41 pm
No new posts Transferring file to Mainframes Shinoj Vijayakumar IBM Tools 3 Thu Dec 06, 2018 2:35 pm
No new posts Convert VBA file to FB! Vignesh Sid SYNCSORT 5 Mon Dec 03, 2018 1:27 pm
No new posts To get the count of PDS data sets whi... Vignesh Sid JCL & VSAM 4 Fri Nov 30, 2018 8:38 pm
No new posts Another 39 File Status on VB file socker_dad COBOL Programming 5 Tue Nov 27, 2018 6:11 am

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