IF THEN ELSE ENDIF construct is used to conditionally execute job steps within a job. A job step execution can…