Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
TWS 'global' or 'local' variables

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
Steve Coalbran

New User

Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Thu Mar 17, 2016 7:40 pm    Post subject: TWS 'global' or 'local' variables
Reply with quote

This is probably an RTFM answer but a colleague of mine today asked me if in TWS he could set (SETVAR?) a pool of 'global' varables which could be accessed by subsequent jobs.
He went on to refine this request realising that he only wanted members of the same (or selected) ADs to be able to see these variables.
Now, I will of course RTFM anyhow, but if anyone can shortcut this with an absolute "NO way José" icon_sad.gif or (better) "YES, easy, like this... " icon_biggrin.gif that would be a great help!?
Back to top
View user's profile Send private message


Global Moderator

Joined: 27 Oct 2009
Posts: 2476
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 17, 2016 10:40 pm    Post subject:
Reply with quote

Ok, do the RTFM. And enlighten us with what you discovered.
Back to top
View user's profile Send private message
David Robinson

Active User

Joined: 21 Dec 2011
Posts: 197
Location: UK

PostPosted: Tue Mar 22, 2016 4:22 pm    Post subject: Reply to: TWS 'global' or 'local' variables
Reply with quote

An interesting question. Just to clarify, you want to use a set some variables in one job that are then available to later jobs in the same or different applications?

I think the short answer is no. The SETVAR statement sets variables that are used for that particular job, it does not store them for use in later jobs. If on the other hand we are talking about predefined variables (in the JCL variable table) then you can just point to the appropriate variable table on the run cycle for the application. Bear in mind also that you can define your own variables in the JCL variable table that can be set based on various criteria such as application name or time of day. You're not limited to using the TWS supplied variables.

If this doesn't suit your requirements, you're going to have to get a bit more creative. Two possibilities that spring to mind are using the PIF (Program Interface) to set variables in the JCL Variable Table that could then be referenced by other jobs or writing appropriate SET statement to a member in the EQQJBLIB concatenation that could then be included in subsequent jobs by use of the FETCH directive.
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 Compare two character variables Head ... Harold Barnes CLIST & REXX 3 Fri Aug 28, 2020 12:38 am
No new posts Global temporary table Akriti Mishra DB2 1 Fri Apr 03, 2020 3:28 am
No new posts Not able to view the values of variab... sattar_engg CA Products 1 Thu Jan 23, 2020 12:32 pm
No new posts Can GLobal variable used under TSOE/REXX Kaliragavendran CLIST & REXX 5 Tue Sep 24, 2019 7:16 am
No new posts Comparison of numeric edited variables Nileshkul COBOL Programming 4 Sat Mar 16, 2019 1:18 am

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us