View previous topic :: View next topic
|
Author |
Message |
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi,
Can any one let me know how i can change the value of the JCL variable using a batch job. Currently i have a JCL table with few variables defined in them. Every day i have to manually change the values in these variables and schedule a stream of jobs to be submitted. If i can change the variable values by means of a batch job, i can automate my entire process and save lot of time. I checked google, and this can be accomplished, but I am not able to find an sample job or steps on how this can be done.
Table name - Industry; variables - typ1, typ2, typ3, typ4
Any suggestion will be of great help for me. Thanks in advance. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Thanks for the suggestion rohit. I will try using the jcl provided.
By any chance donu have a sample for a rexx code.. I would like to try in rexx also |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You will have to find out if there is a REXX/OPC api (check doumentation) and if it is available in your shop (check OPC support group). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
One possible way to do it is to have the variables in a PDS as SET statements, and update the PDS with the newest values with your batch job.
Then use JCLLIB and INCLUDE MEMBER in your JCL to pull the updated values from the PDS in subsequent jobs. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
This really isn't the way that TWS variables are designed to be used. If you need to update them every day, the data should really be stored elsewhere. That said, there are possibilities, you will need to consider which is the best for you.
The link that has been provided looks promising although I have not used it, as does the suggestion of using an INCLUDE statement and having the variables set in another PDS member.
Otherwise I believe it is possible to update the JCL variable table using the PIF (Program Interface) although again, it's not something I have ever felt the need to do.
How do you determine the values for these variables? Is there some pattern to it, e.g.; is it always the same on a Monday for example. If so, you could use the concept of dependent variables, where the value of your particular variable is set to the value you specify based on the value of some known TWS variable, such as the day of the week.
If there is no pattern to them, you could define them as setup variables. That is, the value of the variable has to be set in the current plan using the TWS panels before the jobs can run. Doing that you can have simpler panels to apply the updates (the Ops could do it for example) and some validation can be performed, e.g.; does the specified variable match the specified picture string?
Read the chapter on JCL variables in the TWS manuals and see what works for you. |
|
Back to top |
|
|
|