Error Message :
N/A
When using this function:
:set &ret# = GET_STATISTIC_DETAIL(&sys_act_me_nr#,RESTART)
to find out, if a run was a restart or a "first" start. According to documentation, the result means:
"Y" - The execution is a restart.
"N" - It is not a restart.
The script-function is returning a different result. The screenshot shows an example to depict the behavior:
<Please see attached file for image>

- A simple job, JOBS.UNIX.INC00116662.RESTART, is executed; RunID 1551158. It prints the result of SYS_ACT_RESTART and ends with the 'exit 5', so that it is immediately stopped with ENDED_NOT_OK.
- SYS_ACT_RESTART gives N in this case (arrow 1).
- Script JOBS.UNIX.INC00116662.2 is executed with &sys_act_me_nr# = 1551158 (first line in script).
- GET_STATISTIC_DETAIL returns N (arrow 2) as expected.
- Restart 1551158 from the statistics window. The RunID of the restarted run is 1551160.
- The script is executed with &sys_act_me_nr# = 1551158 again.
- GET_STATISTIC_DETAIL returns Y (arrow 3). This is not correct. 1551158 is not a restart, but the original run.
- Execute the script with &sys_act_me_nr# = 1551160.
- GET_STATISTIC_DETAIL returns Y (arrow 4) as expected, cause this is the rerun.
I.e. the result is not only Y when the RunID is a rerun, but always when a rerun exists for the RunID. Only when there is no rerun for a RunID, the result is always N (see example RunID 1545054 in the screenshot). This seems to contradicts the docu and also the result of SYS_ACT_RESTART, as you can see from the screenshot.