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

Substitute OPC Varables inside Data set.


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jumana haseen

New User


Joined: 07 Jun 2011
Posts: 9
Location: india

PostPosted: Thu Jul 28, 2011 12:30 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jul 28, 2011 1:05 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 28, 2011 1:48 pm
Reply with quote

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
View user's profile Send private message
jumana haseen

New User


Joined: 07 Jun 2011
Posts: 9
Location: india

PostPosted: Thu Jul 28, 2011 2:28 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 28, 2011 2:38 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 28, 2011 2:51 pm
Reply with quote

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
View user's profile Send private message
jumana haseen

New User


Joined: 07 Jun 2011
Posts: 9
Location: india

PostPosted: Thu Jul 28, 2011 3:22 pm
Reply with quote

Thank you so much for all comments
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 Jul 28, 2011 4:30 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jul 28, 2011 5:12 pm
Reply with quote

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
View user's profile Send private message
jumana haseen

New User


Joined: 07 Jun 2011
Posts: 9
Location: india

PostPosted: Fri Jul 29, 2011 11:07 am
Reply with quote

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
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top