The TWS for z/OS parameter RETCODE, in the EWTROPTS statement, can be set to HIGHEST or LAST.
It controls how the job completion code, for a job or started task, is set.
Specifying HIGHEST, the return code will be the highest return code of all the performed steps.
Specifying LAST, the return code will be the return code of the last performed step.
Starting from z/OS 1.13, the z/OS JOBRC keyword can be added into the JOB card of the JCL.
JOBRC parameter controls how the job completion code is set.
By default (when JOBRC is not specified), the job completion code is set to the highest return code of any step,
or if the job's execution fails because of an ABEND, the job completion code is set to the last ABEND code;
this parameter can be used to request that the job completion code be set to the return code of the last step that is executed in the job.
So TWS for z/OS RETCODE keyword clashes with z/OS JOBRC keyword.
The JOBRC keyword is supported from TWS for z/OS 8.6.0; that is, if the JOBRC keyword is defined into
the JCL and it has a value like MAXRC or LASTRC, the value filled on RETCODE keyword into EWTROPTS will be
overwritten from the JOBRC value for that JCL.
Instead if JOBRC has the value STEP, the keyword JOBRC will be ignored by TWS for z/OS, and the RETCODE value filled into
EWTROPTS will be used as usually.
To have the support of JOBRC keyword, you have to apply PM65689 and PI34263 for TWS for z/OS 8.6.0, PI34263 for
TWS for z/OS 9.1.0 and 9.2.0.