PROMPT RMINC_run_coal.sql
PROMPT               $RMINC_TOP/sql/RUN_COAL.SQL
PROMPT Calls         $RMINC_TOP/sql/coaltbsp.sql
PROMPT

PROMPT Coalesce Tablespaces (RMINC)

PROMPT user SYS needs to give user APPS ability to select from 
PROMPT sys.dba_tablespaces
PROMPT Copyright 2000, All Rights Reserved, Reed-Matthews, Inc.
set linesize 180
set pagesize 200
clear buffer
set head off
set termout off
set feedback off
spool &1..RMINC_coaltbsp.sql;
-- select 'spool &1..RMINC_coalesce.lis' from dual;
select 'whenever sqlerror continue' from dual;
select 'alter tablespace '||tablespace_name||' coalesce;'
        from sys.dba_tablespaces;
select 'PROMPT ALL DONE;' from dual;
spool off;
spool &1
set echo on
set termout on
set feedback on 
@&1..RMINC_coaltbsp.sql
host rm &1..RMINC_coaltbsp.sql
exit;