execute script as
sql.SetErrorHandlingState(CONTINUE);
set output=off;

ScriptResultSet rs = sql.GetCurrentResultSet();
long count;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CCOM12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CCOM12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CCOM12' AND SCRIPT_NAME = 'LOAD_COM_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CCOM12.LOAD_COM_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CFIN12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CFIN12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CFIN12' AND SCRIPT_NAME = 'CREAT_COMPANY_VIEWS';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CFIN12.CREAT_COMPANY_VIEWS;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CFIN12' AND SCRIPT_NAME = 'LOAD_FACTS_BAL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CFIN12.LOAD_FACTS_BAL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CFIN12' AND SCRIPT_NAME = 'LOAD_FACTS_BL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CFIN12.LOAD_FACTS_BL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CFIN12' AND SCRIPT_NAME = 'LOAD_FIN_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CFIN12.LOAD_FIN_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPCS12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPCS12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPCS12' AND SCRIPT_NAME = 'LOAD_PCS_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPCS12.LOAD_PCS_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPRO12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPRO12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPRO12' AND SCRIPT_NAME = 'LOAD_PRO_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPRO12.LOAD_PRO_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPST12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPST12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPST12' AND SCRIPT_NAME = 'LOAD_PST_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPST12.LOAD_PST_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CPST12' AND SCRIPT_NAME = 'EXPORT_PUR';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CPST12.EXPORT_PUR;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CSFC12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CSFC12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CSFC12' AND SCRIPT_NAME = 'LOAD_SFC_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CSFC12.LOAD_SFC_FTP;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CSST12' AND SCRIPT_NAME = 'CONTROL';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CSST12.CONTROL;

select Count(*) from SYSTEM.USER_SCRIPTS where SCHEMA_NAME = 'B4CSST12' AND SCRIPT_NAME = 'LOAD_SST_FTP';
rs = sql.GetCurrentResultSet();
rs.next();
count = rs.getLong(1);
if (count > 0)
	drop script B4CSST12.LOAD_SST_FTP;
/