Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2013-10-25T15:09:10Z by Kumar_Y
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Refresh System Variables

‏2011-02-28T01:08:56Z |
Hi,

Can any one help me in knowing how to refresh system variables ( var://system/xyz/pqr)in datapower?

Thanks
Raj
Updated on 2012-12-10T18:41:09Z at 2012-12-10T18:41:09Z by HermannSW
  • HermannSW
    HermannSW
    4501 Posts
    ACCEPTED ANSWER

    Re: Refresh System Variables

    ‏2011-02-28T10:57:30Z  in response to SystemAdmin
    Hello,

    find the details on how to use "var://system/xyz/pqr" in online documentation for set-system-variable command:
    http://publib.boulder.ibm.com/infocenter/wsdatap/v3r8m1/index.jsp?topic=/xa35/commandreference147.htm

    These variables are so called global variables, you may want to look for "var://system/contextname/varname" in this developerWorks article too:
    http://www.ibm.com/developerworks/websphere/library/techarticles/0708_maze/0708_maze.html

    Hermann.
    • HermannSW
      HermannSW
      4501 Posts
      ACCEPTED ANSWER

      Re: Refresh System Variables

      ‏2011-02-28T11:38:08Z  in response to HermannSW
      Sorry,

      it is the set-system-var command.

      Setting your variable can be done in CLI simply by login to CLI and then
      xi50# configure terminal
      Global configuration mode
      xi50(config)# set var://system/xyz/pqr test
      xi50(config)#
      


      There is no CLI command to read the value of a global variable or get a listing of defined global variables.

      What you can do for that is:
      • create a dummy service (eg. loopback XML FW, match all, just results action)
      • turn on Multistep Probe for that service
      • send a single request to that service
      • open the transaction in Multistep Probe
      • click on "Global Variables" tab

      You will see something like this:
      Global Variables:
                      name                    type    value
                      var://system/abc/def string '1'
                      var://system/xyz/pqr string 'test'
      


      Hermann.
      Updated on 2014-03-25T03:34:16Z at 2014-03-25T03:34:16Z by iron-man
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Refresh System Variables

    ‏2012-12-10T10:31:57Z  in response to SystemAdmin
    Hi,

    Is there any why to get active system variables for an service by a SOMA script? if so, please guide me!!!!!

    Thanks in Adv

    Regards,
    Naren
    • HermannSW
      HermannSW
      4501 Posts
      ACCEPTED ANSWER

      Re: Refresh System Variables

      ‏2012-12-10T18:41:09Z  in response to SystemAdmin
      From this posting:
      http://www.ibm.com/developerworks/forums/thread.jspa?threadID=362805#14588223

      "There is no CLI command to read the value of a global variable or get a listing of defined global variables."

      The same is true for SOMA commands, see "store:///xml-mgmt*.xsd" files (only "ActionSetSystemVar" is there).

      I cannot find the thread now, but be aware that:
      • use of global variables is not a best practice
      • global variables are not thread safe
      • you should not use them at all if you can avoid (besides those which are predefined)

       
      Hermann<myXsltBlog/> <myXsltTweets/>
      • Kumar_Y
        Kumar_Y
        216 Posts
        ACCEPTED ANSWER

        Re: Refresh System Variables

        ‏2013-10-23T15:59:54Z  in response to HermannSW

        Hi Hermann,

        Can you please explain what are problems we can face by using global variables?

        • HermannSW
          HermannSW
          4501 Posts
          ACCEPTED ANSWER

          Re: Refresh System Variables

          ‏2013-10-24T08:03:00Z  in response to Kumar_Y

          The two major problems are

          1. they are not thread safe
          2. there is no automatic memory cleanup -- you have to do it (eg. by setting to empty string if not needed).
            Risk is that box might run out of memory if you do not do that correctly.


          So again, use of global variables is a "don't do that if you are not really forced".


          Hermann<myXsltBlog/> <myXsltTweets/>