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.
Warning

If you set the RETCODE option to a value greater than 4 and PCP detects an error under a RECOVERY PLUS execution, RECOVERY PLUS terminates with a user 4094 abend. If you set the RETCODE option to a value of 4 or less and PCP detects an error, RECOVERY PLUS sets the job completion code to the RETCODE value and does not terminate the job step.

Uses

You can set the RETCODE option at the following levels:

  • Global options module
  • GLBL control statement

ISPF panel field

Return Code When Running Stand-Alone

  • Error Completion Code
  • Warning Completion Code
  • Return Code If Error under Another Utility

PCPSYSIN keyword

RETCODE(error,warning)

Values

Specify one or both of the following positional values:

  • error

    The condition code (0-4096) to issue if PCP discovers an error condition.

  • warning

    The condition code (0-4096) to issue if PCP discovers a warning condition.

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)

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*