[AWA] Example of use REGISTER_VARIABLE script element

Document ID : KB000121657
Last Modified Date : 29/11/2018
Show Technical Document Details
Introduction:
Script element REGISTER_VARIABLE
  • Script statement: Available on Windows and UNIX for use in a Job object's (JOBS) Process Tab to storing a value computed during the execution of the job. It can be used in conjunction with an external interpreter script call and :BEGIN_EXT_INTERPRETERS... :END_EXT_INTERPRETERS.
  • Please note that: AE's scripts will be generated before JCL, so practically the variables assigned by using REGISTER_VARIABLE should be called or published in Post-process page
  • You can simply publish the variables for parent workflow or sub-sequential tasks
Instructions:
  • Example 1: using Windows BAT command
    • Process Page:
    • set test='Hello World!'
      :REGISTER_VARIABLE myvar#, %test%
      
    • Post-Process Page
    • :PUBLISH &myvar#
      
 
  • Example 2: Using external interpreters (for example Powershell)
    • Process Page
    • :BEGIN_EXT_INTERPRETERS Powershell
           $test='Hello World!'
           :REGISTER_VARIABLE myvar#, $test
      :END_EXT_INTERPRETERS
    • Post-Process Page
    • :PUBLISH &myvar#

       
Additional Information:
Documentation: