Automic Workload Automation

  • 1.  VARA,,COLUMN syntax for reading values from dynamic VARA objects

    Posted Feb 06, 2017 08:11 AM
    I discovered last week that it is possible to read values from dynamic VARA objects (such as SEC_SQLI VARAs) by specifying the column, but not the key:
    • InVARA object references:
      {ABC.GET_FIRST_USER.VARA_SQL,,1}
    • In GET_VAR script commands:
      :SET &FIRST_USER# = GET_VAR(ABC.GET_FIRST_USER.VARA_SQL,,1)
    This format — specifying the column, but not the key — is not documented anywhere that I could find. Can anyone point me to a page where this format is documented? Can someone confirm whether this format is supported?


  • 2.  VARA,,COLUMN syntax for reading values from dynamic VARA objects

    Posted Feb 10, 2017 03:43 PM
    I opened an information request with Automic Support for this question. I will report their answer here.


  • 3.  VARA,,COLUMN syntax for reading values from dynamic VARA objects

    Posted Feb 13, 2017 07:31 AM
    Automic Support replied, and pointed me to the following sentence on the documentation page for GET_VAR:
    The first line is used if the parameter             Key          is not specified.  Note that you must always specify the key in static Variable objects in which the validity area "Freely selected" is selected.
    So, the answer to my question is:
    Yes, the VARA,,COLUMN syntax, omitting the Key, is valid in many cases. Whether it is valid depends on the variable being accessed.
    I was unsure because the documentation page does not capture this subtlety. First, the syntax overview on the documentation page is misleading, suggesting that for the Key and Column either both must be omitted, or both must be specified. Second, the documentation page does not include any examples wherein the key is omitted.

    The syntax overview does not correctly show that the Key and Column are independent of each other, and that whether or not the key is optional depends on the type (and scope) of the variable being accessed.
    GET_VAR(Variable, [Key, Column], [XPath/XQuery])
    There are actually two different syntaxes for GET_VAR:
    1. A syntax for readingstatic variables with the scope freely selected
      Thekeyisrequired in this format.
    2. A syntax for reading static variables with a scope other thanfreely selected, and for reading dynamic variables.
      The keyisoptional in this format.
    Here is an example of how one might update the documentation to show this:

    Static variables with the scope set to freely selected

    GET_VAR(Variable, Key, [Column], [XPath/XQuery])

     

    Dynamic variables & static variables with a scope other than freely selected

     

    GET_VAR(Variable, [Key], [Column], [XPath/XQuery])
    The documentation should also include an example or two that demonstrate how to use the syntax that omits the key.

    I will request that the documentation be updated.


  • 4.  VARA,,COLUMN syntax for reading values from dynamic VARA objects

    Posted Feb 13, 2017 09:53 AM
    I just posted a related thread on the scope of static VARA objecsts.


  • 5.  Re: VARA,,COLUMN syntax for reading values from dynamic VARA objects

    Posted Jan 14, 2019 12:07 PM

    For expanded and updated information about this topic, see GET_VAR syntax.