Script to list if tablespace is in backup mode in Oracle

The script will list your tablespace state / backup mode in Oracle

select a.file#,
       b.name,
       decode(a.status,
              'ACTIVE',
              'In backup mode',
              'NOT ACTIVE',
              'Not in backup mode') as "backup mode"
  from v$backup a, v$datafile b
 where a.file# = b.file#