View previous topic :: View next topic
|
Author |
Message |
jumana haseen
New User
Joined: 07 Jun 2011 Posts: 9 Location: india
|
|
|
|
Hi I have following requirement can any one please help me achieve this.
I have a Job which extracts required details from data base and creates a report.
This report will be sent as an attachment to given business email id.
The SMTP dataset contenets are as below :
Code: |
HELO MAINFRAME.domain.com
HELO MAINFRAME.domain.com
MAIL FROM: <SMTP@MAINFRAME.domain.com>
RCPT TO: <rctp email id>
DATA
FROM: From IT Team
TO: rctp email id
SUBJECT: Database Error Report
MIME-VERSION:1.0
CONTENT-TYPE:MULTIPART/MIXED;BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE:TEXT/HTML;
<BR>
Please find attached details of errors received on policies found in the current month .
<BR><BR>
Please arrange for these errors to be corrected in the source system before 27th of every month .
--SIMPLE BOUNDARY
CONTENT-TYPE:TEXT/PLAIN; NAME="Error Report&Month&Year.CSV"
CONTENT-TRANSFER-ENCODING: "UTF-8"
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=" Error Report &Month&Year.CSV" |
Here Is it possible to Substitute '&Month&Year' using OPC . If yes , please advice how?
If not by OPC , Is there any other by which I can embed the current month and year in file name.
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You need to speak with the people responsible for OPC (TWS) to find out the variable names in use that match the required format.
Usually site specific, so not sure that we can help much further. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
You can find it all here : TWS Managing the Workload
But follow expat's suggestion (ask the TWS/OPC people)
cause your question shows you dont know that much about TWS/OPC. |
|
Back to top |
|
|
jumana haseen
New User
Joined: 07 Jun 2011 Posts: 9 Location: india
|
|
|
|
What exactly I need to know is , How do I substitue OPC variables from within the data set.
The mail contant which i have given above is going to be inside one dataset and the corresponsing JCL step for the same would be following SMTP step :
Code: |
//STEP010 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=ABCD.REPORT.EMAILP1,DISP=SHR
// DD DSN=EFGH.RJCT.REPORT.LATEST,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP),DEST=GBNUHON1
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
|
The mail content which i have posted earlier will be the content of data set : ABCD.REPORT.EMAILP1. Hope I am clear now. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
only thing you are clear about is that you are going to do something without working with your site support people.
no wonder that we have so many posts by people who
want to do it their way, and have no intention of dealing with their site support,
who essentially make the rules. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
If you should have read in the manual the part about variable substitution
or talked to your TWS/OPC people you should have known that what you want (substitution IN a dataset) is not possible.
So this will be my last comment on this topic. |
|
Back to top |
|
|
jumana haseen
New User
Joined: 07 Jun 2011 Posts: 9 Location: india
|
|
|
|
Thank you so much for all comments |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
There are, I believe, examples using sort that do what you want. Search in the part of the forum suitable for your flavour of sort. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
jumana haseen,
As Nic said above, it is possible to have a sort pass to have the respective fields replaced by current month/year. Try it and get back to us if you are stuck up somewhere. |
|
Back to top |
|
|
jumana haseen
New User
Joined: 07 Jun 2011 Posts: 9 Location: india
|
|
|
|
Hi Arun , Nic
I tried to serach forum for SORT pass without success. Can you please let me know if you have the SORT step which will do the above.
Thanks. |
|
Back to top |
|
|
|