set linesize 300
set pagesize 1000
set head off
set feedback off
set echo off
set verify off
set term off
set serveroutput on
spool check_kc.sql
PROMPT set term on
PROMPT set linesize 300
PROMPT set pagesize 1000
PROMPT set head off
PROMPT set feedback off
PROMPT set echo off
PROMPT set verify off
PROMPT set serveroutput on
PROMPT COL CVOR FORMAT A15
PROMPT COL LOCAL_TRAN_ID FORMAT A13
PROMPT COL GLOBAL_TRAN_ID FORMAT A30
PROMPT COL STATE FORMAT A15
PROMPT COL MIXED FORMAT A5
PROMPT COL HOST FORMAT A15
PROMPT COL COMMIT# FORMAT A15
select 'SELECT '''||sifra||':'' "CVOR",V.SIFRA,M.NAZIV FROM '||sifra||'.MKC_SUSTAVI@'||sifra||' M, '||sifra||'.SKC_VSUSTAVA@'||sifra||' V where v.id=m.kcvs_id and v.sifra <> ''ECSA'';' from smet_cvorovi where ozn_u_mrezi = -1 order by sifra;
PROMP PROMPT 
PROMPT exit;
spool off;
@check_kc.sql
exit;