With v11.1
a new script command :REGISTER_VARIABLE
was introduced which got not very much attention.
BUT
·
It’s
an awesome script command to pass unix or WIN variables to Automic Script with
only one command.
·
It`s
a replacement for a performance consuming structure with prep_process_report
and get process_line etc. where the whole report has to be parsed.
Example:
Win JOB Script:
set
test=Schubiduba
echo %test%
:REGISTER_VARIABLE
"scriptvar#", %test%
Win JOB Postscript:
:print
&scriptvar#
Win JOB Report:
c:\>set
test=Schubiduba
c:\>echo
Schubiduba
Schubiduba
Win JOB Post Process Report
2016-01-15
11:05:30 - U00020206 Variable '&SCRIPTVAR#' was stored with value
'Schubiduba'.
2016-01-15
11:05:30 - U00020408 Schubiduba
Same for
Linux:
test="Schubiduba"
echo $test
:REGISTER_VARIABLE
"scriptvar#", $test
Linux Job Report:
Schubiduba
Registered
variable: 'T' scriptvar#=Schubiduba
Linux Job Post Process Report:
2016-01-15
11:03:22 - U00020206 Variable '&SCRIPTVAR#' was stored with value
'Schubiduba'.
2016-01-15
11:03:22 - U00020408 Schubiduba
http://docs.automic.com/documentation/AE/11.1/english/AE_WEBHELP/help.htm?product=awa#ucsaba.htm?Highlight=register_variable