Value ACT_PARTITION in UC_ILM_SETTINGS has 18 digits, that is too long for script command FORMAT

Document ID : KB000084348
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
U00020320 Runtime error in object 'SCRI.INC00128272.01', line '00004'. Converting string to numerical value is not possible. String '00000000000000013'

Up to version 10, the value of ACT_PARTITION in UC_ILM_SETTINGS had only 9 digits (including leading 0), in version 11 it has 18 digits.

Investigation

This can be seen, for example, in the xml-export of this variable:

V10
<row Name="ACT_PARTITION" Value="000000216" Value1=" " Value2=" " Value3=" " Value4=" "/>

V11
<row Name="ACT_PARTITION" Value="000000000000000015" Value1="" Value2="" Value3="" Value4=""/>

That causes subsequent problems with for example the function :FORMAT. Also, 18 digits is more than the 16 digits that would be valid for a data type unsigned.

For example, this script worked up to V10:

 
:IF ILM(ACTIVE) = "Y" 
: SET &CNT# = 1 
: SET &ILM_PART_ACT# = GET_VAR("UC_ILM_SETTINGS", "ACT_PARTITION") 
: SET &ILM_PART_ACT# = FORMAT(&ILM_PART_ACT#) 
: WHILE &CNT# < &ILM_PART_ACT# 
: SET &RET# = ILM(CHECK, "&CNT#") 
: SET &CNT# = FORMAT(&CNT#) 
: SET &RET# = FORMAT(&RET#) 
: PRINT "Partition &CNT#: Status &RET#" 
: SET &CNT# = ADD(&CNT#,1) 
: ENDWHILE 
:ENDIF

However, in V11 the error message is displayed.

 
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: The integer value in UC_ILM_SETTINGS has 18digits instead of 16digits. When the user uses Script function format() after call get_var(uc_ilm_settings) the script ends with error: Converting string to numerical value is not possible.

:set &xx# = get_var(uc_ilm_settings, 'ACT_PARTITION')
:p &xx#
:set &xx# = format(&xx#)
Resolution:
Update to a fix version listed below or a newer version if available.

Fix Status: Released

Fix Version(s):
AE Server and Initialdata
Automation Engine 12.1.0 - Available
Automation Engine 12.0.4 - Available
Automation Engine 11.2.6 - Available
Additional Information:
Workaround :
Use function DEFINE:
 
:DEFINE &ILM_PART_TMP#,unsigned 
:DEFINE &ILM_PART_ACT#,string 
: SET &ILM_PART_TMP# = GET_VAR("UC_ILM_SETTINGS", "ACT_PARTITION") 
: SET &ILM_PART_ACT# = FORMAT(&ILM_PART_TMP#)