:DEFINE Script Statement fails to check for double usage for the same array resulting in no error

Document ID : KB000084455
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

 The check on double usage of :DEFINE for the same array does not result in an error as expected.

Investigation

The following code is used to depict the issue:

:DEFINE &a#,STRING,9
:DEFINE &a#,STRING,9

:DEFINE &MVSFILE#, string, 9

:SET &HND# = PREP_PROCESS_VAR(SOME.VARA)
:PROCESS &HND#
:  SET &line# = GET_PROCESS_LINE(&HND#)
:  FILL &MVSFILE[] = STR_SPLIT(&line#,"§§§")
:  PRINT &line#
:ENDPROCESS
:CLOSE_PROCESS &HND#

When executing this code there is no error, although according to the documentation there are 2 things wrong:
  1. Variable &a# is defined twice, in line 1 and 2. In the Automation Engine Script Guide > Ordered by Function > Script Structure and Processing > :DEIFINE  the documentation states that this is not allowed.
  2. ​In line 3 of the code above, a variable &MVSFILE# is defined and in line 7 &MVSFILE[] it is used. Though the # at the end is missing, the variable is accepted without an error.
Cause:
Cause type:
Defect
Root Cause: The check on double usage of :DEFINE for the same array does not result in an error.
Resolution:
Update to a fix version listed below or a newer version if available.

Fix Status: In Progress

Fix Version(s):
AE Server and Initialdata
Automation Engine 12.2.0 - Planned release date: 2018-06-19
Automation Engine 12.1.1 - Available
Automation Engine 12.0.4 - Available
Automation Engine 11.2.6 - Available
Additional Information:
Workaround :
N/A