Oracle Error RMAN-03032: this option of set command needs to be used outside of a run block

Oracle Error Message

RMAN-03032: this option of set command needs to be used outside of a run block

Reason for the Error

The option used with the SET command is not valid inside of a run block.

Solution

Change the SET command or place it outside a run block.