GET_SCRIPT_VAR unable to find variable name after upgrade from V10 to V11 or V12

Document ID : KB000084957
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
U01001350 Variable 'TEST' not found

In V10 the following script worked:
 
:set &TEST# = "Hallo"
:print &&TEST# = &TEST#
:set &VAR_TEST# = get_script_var("TEST")
:print &&VAR_TEST# = &VAR_TEST#
 
The result is, as expected:
 
2017-03-24 08:09:15 - U0020408 &TEST# = Hallo
2017-03-24 08:09:15 - U0020408 &VAR_TEST# = Hallo

If you execute the same script in V11 or V12, the above error message is displayed.
 
In V11 and V12, get_script_var does not find the variable when the hashtag at the end is missing (upper example script). The name of the variable is TEST#, not TEST. In V10 get_script_var worked though the hashtag is missing. This was a bug as the hashtag should have been required. To make it work in V11 or V12, a single character must be changed as follows:

:set &TEST# = "Hallo"
:print &&TEST# = &TEST#
:set &VAR_TEST# = get_script_var("TEST#")
:print &&VAR_TEST# = &VAR_TEST#

Add the hashtag to complete the full name of the variable.  After upgrading to V11 or V12 from V10 all scripts using get_script_var with an incomplete name display will generate the abvove error message.
Cause:
Cause type:
By design
Root Cause: In V11 and V12, get_script_var does not find the variable when the hashtag at the end is missing (upper example script).
Resolution:
In V11 and V12, get_script_var does not find the variable when the hashtag at the end is missing (upper example script). The name of the variable is TEST#, not TEST. In V10 get_script_var worked though the hashtag is missing. This was a bug as the hashtag should have been required. To make it work in V11 or V12, a single character must be changed as follows:

:set &TEST# = "Hallo"
:print &&TEST# = &TEST#
:set &VAR_TEST# = get_script_var("TEST#")
:print &&VAR_TEST# = &VAR_TEST#

Add the hashtag to complete the full name of the variable.  After upgrading to V11 or V12 from V10 all scripts using get_script_var with an incomplete name display will generate the abvove error message.


Fix Status: No Fix

Additional Information:
Workaround :
Add the hashtag to complete the full name of the variable.