Automic Workload Automation

  • 1.  trim trailing blanks

    Posted Mar 12, 2019 02:20 PM

    is it an expected behavior in how AWA stores values containing trailing spaces/blanks (V10 vs V12)?  We have discovered that V12 does not trim trailing spaces for values in VARIABLE OBJECTS, and for values in the PROMPTS tabs.  



  • 2.  Re: trim trailing blanks

    Posted Mar 13, 2019 05:31 AM

    This behavior is normal. If you want to trim trailing blanks, use the STR_RTRIM script function. Keep in mind too that although the Automation Engine stores trailing (and leading) blanks, it implicitly removes trailing (but not leading) blanks during string comparisons.



  • 3.  Re: trim trailing blanks

    Posted Mar 13, 2019 08:22 AM

    Yes, after trying more examples I found it to be normal (for AWA scripting).  What I thought was a difference in the substr turns out to be a difference in how awa treats trailing blanks upon save of objects.  V10 trimmed trailing blanks, V12 does not.  This caused some outages for us, but we know how to fix this so, other than being aware of the behavior, it is manageable – was just a surprise.   



  • 4.  Re: trim trailing blanks

    Posted Mar 13, 2019 08:37 AM

    Ah, OK. I never used version 10. I added a note about this topic to my document Variables in the Automation Engine. You might also find it informative.



  • 5.  Re: trim trailing blanks

    Posted Mar 13, 2019 09:02 AM

    Thanks!  A useful page of information for sure.  (This.  That all this information about handling variables aggregated in a nicely laid out “single” page.)

     

    Funny (kind of) side story.  The technique of using a terminator, typically and recommended as ‘#’ became known as final, i.e., using ‘#’ as terminator prevented variable name collision.  I often had to show my snippet of code (from real life example) that it wasn’t a final and perfect solution (e.g., &HOST# is good, but then someone decided they needed &HOST#2  ☹).  Very happy to see the paragraph on this on that page as it addresses the behavior perfectly.

     

    Thanks for the tip(s).