RETCODE
When PCP detects an error condition in the database it is validating, it sets a condition code. It can also set a condition code if it detects a warning condition. Use the RETCODE option to control the condition codes that PCP issues for error and warning conditions.
You can set different codes to use for errors and warnings. For best results, set the error code to the higher value. You can also set a different error code to use when executing under another utility as opposed to executing as a stand-alone utility.
- If the Hash Checking technique is executing under another utility and it detects an error, PCP passes the condition code to the other utility. The job step completes with this condition code or higher. If the Hash Checking technique detects a warning condition while executing under the other utility, the warning condition code is passed to the other utility. See the value of the warning condition code in the Warning Completion Code field in the global options module or by the RETCODE(,warning) keyword.
- If the stand-alone Hash Checking technique detects an error, it sets the job step completion code to the value you set in the Error Completion Code field in the global options module or with the RETCODE(error) keyword. If the stand-alone Hash Checking technique detects a warning condition, it sets the job step completion code to the value you set in the Warning Completion Code field in the global options module or with the RETCODE(,warning) keyword. The stand-alone Hash Checking technique issues the error condition code if it finds both error and warning conditions in the database.
- If the Full Checking technique detects an error, it sets the job step completion code to the value you set in the Error Completion Code field in the global options module or with the RETCODE(error) keyword. If the stand-alone Full Checking technique detects a warning condition (for example, a logical parent without a logical child or slack bytes greater than 7 bytes), it sets the job step completion code to the value you set in the Warning Completion Code field in the global options module or with the RETCODE(,warning) keyword. The stand-alone Full Checking technique issues the error condition code if it finds both error and warning conditions in the database.
Uses | You can set the RETCODE option at the following levels:
|
---|---|
ISPF panel field | Return Code When Running Stand-Alone
|
PCPSYSIN keyword | RETCODE(error,warning) |
Values | Specify one or both of the following positional values:
|
Default | When executing under another utility, the internal default to set the condition code to 8 for an error and 0 for a warning. When executing as a stand-alone utility, the internal default is to set the condition code to 8 for an error and 0 for a warning. |
Examples | The following example sets the job completion code to 12 if the Full Checking technique, which always executes as a stand-alone utility, detects an error and to 8 if it detects a warning condition. GLBL TYPE(FULL) RETCODE(12,8) The following example passes a condition code of 4 to the other utility if the Hash Checking technique detects an error condition and passes a condition code of 0 for a warning condition: GLBL RETCODE(4,0) |