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
 

 

OPC JCL Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: OPC JCL Variable
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

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Fri Jul 01, 2016 7:17 am    Post subject:
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    Post subject: Reply to: OPC JCL Variable
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: 1714
Location: UK

PostPosted: Fri Jul 01, 2016 8:06 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 04, 2016 12:13 pm    Post subject:
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: 175
Location: UK

PostPosted: Tue Jul 05, 2016 8:57 pm    Post subject: Reply to: OPC JCL Variable
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    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 Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am
No new posts File Manager with Variable Length File ahabib IBM Tools 10 Thu Mar 31, 2016 11:00 pm
No new posts How storage is calculated for AN-Edit... Raghu navaikulam COBOL Programming 2 Wed Mar 09, 2016 3:51 pm


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