Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Substitute OPC Varables inside Data set.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: Substitute OPC Varables inside Data set.
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 28, 2011 1:05 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 28, 2011 1:48 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 28, 2011 2:51 pm    Post subject:
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    Post subject:
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: 1715
Location: UK

PostPosted: Thu Jul 28, 2011 4:30 pm    Post subject:
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: 2161
Location: @my desk

PostPosted: Thu Jul 28, 2011 5:12 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us