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

OPC JCL Variable


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

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Fri Jul 01, 2016 4:21 am
Reply with quote

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

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Jul 01, 2016 7:17 am
Reply with quote

Set a JCL variable in one job and pass it to another JCL or may be any REXX code would work so you need to look in that direction.
Back to top
View user's profile Send private message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Fri Jul 01, 2016 7:43 am
Reply with quote

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

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 01, 2016 8:06 pm
Reply with quote

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

Global Moderator


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

PostPosted: Mon Jul 04, 2016 12:13 pm
Reply with quote

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

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Tue Jul 05, 2016 8:57 pm
Reply with quote

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
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top