Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
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.
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.