View previous topic :: View next topic
|
Author |
Message |
wik123
New User
Joined: 13 Jul 2018 Posts: 8 Location: Nederlands
|
|
|
|
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 |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 658 Location: Denmark
|
|
|
|
Not without some programming. Simple enough to do in REXX. |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
 |
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1180 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
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 |
|
 |
|