To set a STAF environment variable you must set it via the VAR service's 
SET request (or you can set a variable in the STAF.cfg file). 

Do you really want to create the same STAF variable on another system? 
Perhaps you really just want to set the variable on one system and access 
it from any system.

For example, on machine Administrator:

  STAF local VAR SET SHARED VAR TEST=hello

On machine Consumer, it can get the value of this variable:

  STAF Administrator VAR RESOLVE SHARED VAR {TEST}
  Response
  --------
  Hello

And if machine Administrator gives machine Consumer trust level 3 or 
greater (note that 3 is the default trust level unless you overrode it), 
it can change the value of the variable on Administrator:

  STAF Administrator VAR SET VAR "Test=New Value"

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Zach Calvert <zachcalv...@gmail.com>
To:     staf-users@lists.sourceforge.net
Date:   03/07/2011 12:53 PM
Subject:        [staf-users] Variable Sharing



I have two machines, call them Administrator and Consumer.  On
Administrator I define a variable called TEST with value hello using
the command
STAF LOCAL VAR SET SHARED VAR TEST=hello
I am trying to get Consumer to have the same value for TEST defined in
the same variable for Consumer.  For example, I want STAF LOCAL VAR
LIST to display a variable with TEST: hello

The only way that I know of to share the variable is through having
Administrator call out
STAF Consumer PROCESS START SHELL COMMAND "STAF LOCAL VAR SET SHARED
VAR TEST={TEST}"
and Administrator must have level 5 administrator access defined on 
Consumer.




Is there an easier way to get a STAF variable off of one machine and
store it onto another?




Thanks,
Zach Calvert

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to