Automic Workload Automation

Expand all | Collapse all

How to run Automic agent command in RedHat Linux to get the value of a variable in UC4?

  • 1.  How to run Automic agent command in RedHat Linux to get the value of a variable in UC4?

    Posted Apr 29, 2019 05:35 PM

    We are trying to get the latest run date of a UC4 job and use it as an environment variable for developers on the Linux Automic agent itself.  I would like to be able to run ":SET &VALUE# = GET_VAR("RUNDATE","RUN_DATE")" to return the run date variable from UC4/Automic.  I don't work with automic much (more of a linux/networking person).  How would I go about doing this?  Does the Automic agent have a CLI?



  • 2.  Re: How to run Automic agent command in RedHat Linux to get the value of a variable in UC4?

    Posted Apr 30, 2019 09:19 AM

    Assuming your RUNDATE var has the properly-formatted date you want in the RUN_DATE key's Value field, you're halfway there.

     

    Try this in your linux job's process tab:

    :SET &VALUE# = GET_VAR("RUNDATE","RUN_DATE")

    uc4date = &VALUE#

    echo "The UC4 run_date value is $uc4date."

    Passing UC4 variables into your scripts is easy; it's passing values back from your batch script into UC4 that's more complicated.