U00020293 | get_statistic_detail with negative return code throws error
search cancel

U00020293 | get_statistic_detail with negative return code throws error

book

Article ID: 260789

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

When a job is run that returns a negative return code, for instance -1073741502 on windows, if a get_statistic_detail is used like this:

:set &task_retcode#=get_statistic_detail(&$RUNID#, RETURN_CODE)

will fail with an error like the following:

U00020293 Runtime error in object 'JOBS.WIN.JOB_NAME', line '00012'. Arithmetic overflow (value: '-0000001073741502')!

and the details for the job show:
FAULT_POST_PROCESSING - error in post processing.

Environment

Release : 12.x, 21.x

Resolution

The reason the error:

U00020293 Runtime error in object 'JOBS.WIN.JOB_NAME', line '00012'. Arithmetic overflow (value: '-0000001073741502')!

is thrown is that the default data type for a numeric input is unsigned (only allows positive integers).  The data type needs to be defined as signed in order to allow a negative number.

This can be done by adding the following line above the get_statistic_detail line:

:define &task_retcode#, signed
:set &task_retcode#=get_statistic_detail(&task_runid#, RETURN_CODE)

This should prevent the arithmetic overflow error you are seeing due to the post processing script.

Additional Information

More information on data types in script can be found here.  Defining data types for calculations can be found here.