How to programatically copy a variable to another MSF system
search cancel

How to programatically copy a variable to another MSF system


Article ID: 132777


Updated On:


OPS/MVS Event Management & Automation


This article explains how one would programatically send a copy of a global variable to another OPSMVS.   MSF must be in use at the site.   

Is it possible to programatically copy an Ops/MVS global variable to another OPS/MVS system? There does appear to be an option on the OPSVIEW Global Variable panel (the MC, MN options eetc)




While the MC option on the AOF CTRL - Display Global Variables screen (=8.4) is the simplest method, REXX code can be used for the same purpose.  

We do not supply a sample member that can be used; however, code would need to use the MSF DEFAULT command to route to the other system, as well as the OPSVALUE command.  Further information in our documentation on these is available in the Command and Function Reference section of our manuals.   
Depending on exactly what is being attempted, there may be other functionality to add into the code.   For instance,  the Backup Globals screen (=7.5 in the Utilities section) panel can be used to create a backup of the site's global variables, which conveniently puts it into REXX format.   A nice feature is that the panel also allows you to create this code by the stem variables in the event not all global variables are needed.  The resulting REXX code for these variables could then be used in the code with the OPSVALUE and MSF DEFAULT.  

To get started, one simplistic example for sending a single variable is as follows:

drid = ' this is a test' 
address opsctl 
"msf default system(msfid)" 
say 'rc='rc 
say 'setvar=' setvar 
address opsctl 
"msf default system(*)"