Managing return codes

By default, all nonzero error codes are considered as an error. Optionally, you can define the error codes that, for job-tracking purposes, are not considered as errors. To do this, set the following parameters:
NOERROR
Defines a list of error codes that, for job-tracking purposes, are treated as normal completion codes. When setting this value on an HCL Workload Automation Agent, beware that the maximum length allowed for a return code is 4 digits. If the HCL Workload Automation Agent returns an error code higher than 9999, it is truncated at the fourth rightmost digit. For example, 12345 is considered as 2345.

For negative error codes, specify a five-character sequence starting with the minus (-) symbol, for example -0008.

ERRRES
Defines a list of error codes that, for job-tracking purposes, result in an automatic reset of an operation. The operation is reset to status A (arriving) and contains the message Error, automatically reset in its operation details panel. An error code can be either of the following:
  • 4-digit job or started-task return code (nnnn)
  • System abend code (Sxxx)
  • User abend code (Uxxx)
  • HCL Workload Automation for Z-defined code

The HIGHRC parameter is supported for positive RC on HCL Workload Automation Agents and agents. Jobs ending with negative RC are always considered in error. The negative RC are handled through NOERROR. For a detailed description of NOERROR and ERRRES, see Customization and Tuning.

The following is a list of the return codes for each job type with advanced options:
Database jobs:
RC =  0 -> Job completed successfully
RC = -1 -> SQL statement was run with an exit code different from 1
RC = -2 -> MSSQL Job error
RC = -3 -> SQL statement did not run because of an error in the statement
File transfer jobs:
RC =  0 -> The file transfer completed successfully

RC = -1 -> The file transfer is not performed. The job fails with the following
error code: AWKFTE007E

Explanation: An error occured during the file transfer operation

Possible reasons: Remote file not found or permission denied

RC = -2 -> The file transfer is not performed. The job fails with the following
error code: AWKFTE020E

Explanation: Only for SSH or Windows protocols. An error was returned
while attempting to convert the code page

Possible reasons: For SSH or Windows protocols, the code page is
automatically detected and converted. In this case, there is an error in the
code page of the file to be transferred, which is not compliant with the
code page of the local system

RC = -3 -> The file transfer is not performed.The job fails with the following
error code: AWKFTE015E

Explanation: An error occurred during the file transfer operation

Possible reasons: Local file is not found

RC = -4 -> The file transfer is performed with the default code page. The job
fails with the following error code: AWKFTE023E

Explanation: The specified codepage conversion has not been performed.
File transfer has been performed with default code pages

Possible reasons: The specified code page is not available
IBM i jobs:
Return code = user return code when retrieved
Return code = 0 -> job completed successfully
Return code > -1 -> job completed unsuccessfully
Web services jobs:
RC =  0 -> Job completed successfully
RC = -1 -> The server hostname contained in the Web Service URL is unknown
RC = -2 -> Web Service invocation error