Focal Point
[CLOSED]Dynamically changing MASTER DDNAME in native FOCUS on z/OS

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5317090286

April 29, 2016, 01:07 PM
J. Erickson
[CLOSED]Dynamically changing MASTER DDNAME in native FOCUS on z/OS
Is there a way in mainframe FOCUS 7.7.03 or earlier to dymaically change the MASTER DDNAME allocation in a focexec? Let's say, after entering native FOCUS, MASTER is allocated to 3 PDSs.

? TSO DDNAME

...
MASTER      3      XYZ.PROD.MASTER 
                   XYZ.ABC.MASTER
                   XYZ.DEF.MASTER
...


I want to run a focexec that needs a master from PDS XYZ.OTHER.MASTER. How can I temporarily (only when the focexec is running) either append or prepend XYZ.OTHER.MASTER to the existing concatenation of libraries currently allocated to DDNAME MASTER? Is there any way to save or store the value of DDNAME MASTER (even a concatenation) to a variable or temp file, then add XYZ.OTHER.MASTER to the MASTER DDNAME concatenation, do some stuff using the master from XYZ.OTHER.MASTER, then restore DDNAME MASTER to what it was when the focexec was executed in native FOCUS, and exit the focexec? When a user initially enters native FOCUS the libraries allocated to DDNAME MASTER *should* be the same for everyone but that might not always 100% be the case. So I'm trying to determine if there's a "dynamic" way to change DDNAME MASTER instead of hardcoding specific allocations and concatenations at the beginning and end of the focexec.

I'm aware that the APP commands available in WebFOCUS are being added in FOCUS 7.7.06, and those might be useful in a situation like this, but I'm working with FOCUS 7.7.03 on z/OS for now.

Thanks,
James

This message has been edited. Last edited by: <Emily McAllister>,


FOCUS 7.7.03
WebFOCUS 8.0.x/8.1
z/OS, Windows
April 29, 2016, 03:27 PM
BabakNYC
It's been a long time since I logged into MVS but would DYNAME ALLOC be what you're looking for?

The FOCUS DYNAM command is used to manipulate data sets under z/OS. Although similar functions are available under TSO, the DYNAM command is very useful in non-TSO environments when TSO is not necessarily present. DYNAM is recommended instead of TSO commands to manipulate data sets.


WebFOCUS 8206, Unix, Windows
April 29, 2016, 03:54 PM
J. Erickson
We use DYNAM ALLOC extensively in our existing mainframe FOCUS routines. That is how I would manually re-allocate MASTER in the focexec that needs the XYZ.OTHER.MASTER library. I would also use DYNAM CONCAT as well to add another PDS to the concatenation of PDSs originally allocated to MASTER. For example:

<somehow save the current value of DDNAME MASTER here>

DYNAM ALLOC FI OTHERMFD DA XYZ.OTHER.MASTER SHR
DYNAM CONCAT FI MASTER OTHERMFD

<some code that uses a master from XYZ.OTHER.MASTER>

<here I want to set MASTER back to what it was before the DYNAM statements above>

-EXIT


The main issue I'm facing is figuring out how to (1) save the current MASTER DDNAME allocation somewhere (a Dialog Manager variable or a temp file) and (2) restore the MASTER DDNAME to what it was when the focexec started to run. The MASTER DDNAME, in my case, is going to have 3 PDSs allocated to it in a concatenation. There will be a difference in 1 of those 3 PDSs, depending upon the specific user on our system, though. My question is how can I put that list of 3 PDSs *somewhere* and also assign that saved list of 3 PDSs back to the MASTER DDNAME after I'm done doing everything else in the focexec.

Thanks,
James


FOCUS 7.7.03
WebFOCUS 8.0.x/8.1
z/OS, Windows
April 29, 2016, 05:58 PM
David Briars
quote:
...save the current MASTER DDNAME allocation somewhere (a Dialog Manager variable or a temp file)...

Take a look at the Dialogue Manager control statement...
-? TSO DDNAME ddname

This statement will store results of the command in amper variables, e.g., &DSNAME.

This message has been edited. Last edited by: David Briars,
April 29, 2016, 11:32 PM
Vivian
What about the USE command? Check it out - it might help you.

This is in both the WebFOCUS Keysheet and Focus Keysheet (the original Keysheet).

This message has been edited. Last edited by: Vivian,


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com