Misleading Error Message when using :REGISTER_OUTPUTFILE with a missing Parameter

Document ID : KB000085004
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
U00020308 Runtime error in object 'JOBS.WIN.INC00124939', line '00004'. Invalid internal parameter type '010121'.

In Automation Engine (AE) version 11 and 12, script function :REGISTER_VARIABLE returns an unexplicit error message "Invalid internal parameter type '<number>'" in the "Messages" window when the second parameter is missing.

Example:

 
17/02/2017 12:24:06 - U00020308 Runtime error in object 'JOBS.WIN.INC00124939', line '00004'. Invalid internal parameter type '010116'.
 
This behavior only impacts AE versions 11 and 12.

Investigation

The error can be seen in jobs where a parameter of :REGISTER_OUTPUTFILE is missing. Here is an example:
dir C:\temp /S >> C:\temp\test.txt@set retcode=%errorlevel% !@if NOT %ERRORLEVEL% == 0 goto :retcode:REGISTER_OUTPUTFILE "C:\temp\test.txt"

There is an error because :REGISTER_OUPUTFILE should always be used with the following syntax:
:REGISTER_OUTPUTFILE File, User Login

The correct usage of this script function should be:
:REGISTER_OUTPUTFILE "C:\temp\test.txt", "Y"

 
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: When :REGISTER_OUTPUTFILE is used without any parameters, a misleading error is displayed. This results in: U00020308 Runtime error in object 'JOBS.WIN.1', line '00004'. Invalid internal parameter type '010121'.
Resolution:
Update to a fix version listed below or a newer version if available where the error message has been reverted to what it originally was in previous versions:
 
Last message U00020501 Runtime error in object 'JOBS.WIN.INC00125224', line '00004': Statement has only '001' current parameters


Fix Status: Released

Fix Version(s):
Component(s) : AE Server & InitialData

Automation Engine 12.1.0 – Available
Automation Engine 12.0.1 – Available
Automation Engine 11.2.4 – Available
Additional Information:
Workaround :
N/A