Oracle Message RMAN-03031 - this option of set command needs to be used inside a run block

ERRORthis option of set command needs to be used inside a run block
CAUSEThe option used with the SET command is not valid outside a run block.
ACTIONChange the SET command or place it inside a run block.