CREATE TABLE "NC001 "."SNMP_MIB" (
"OID" CHAR(200) NOT NULL ,
"ONAME" CHAR(100) NOT NULL ,
"PID" CHAR(200) ) ;
insert into NC001.SNMP_MIB values('SNMP_MIB','SNMP_MIB','SNMP_MIB');
CREATE TABLE "NC001 "."MIB" (
"OID" CHAR(200) NOT NULL ,
"ONAME" CHAR(100) NOT NULL ,
"PID" CHAR(200) ) ;
CREATE PROCEDURE EDWDATA.sp_test
(
)
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
begin
declare SqlStr varchar(500);
declare v_version_number INTEGER default 1;
declare v_cursor_statement VARCHAR(32672);
declare v_load_command VARCHAR(32672);
declare v_sqlcode INTEGER default -1;
declare v_sqlmessage VARCHAR(2048) default '';
declare v_rows_read BIGINT default -1 ;
declare v_rows_skipped BIGINT default -1;
declare v_rows_loaded BIGINT default -1;
declare v_rows_rejected BIGINT default -1;
declare v_rows_deleted BIGINT default -1;
declare v_rows_committed BIGINT default -1;
declare v_rows_part_read BIGINT default -1;
declare v_rows_part_rejected BIGINT default -1;
declare v_rows_part_partitioned BIGINT default -1;
declare v_mpp_load_summary VARCHAR(32672) default NULL;
CALL sysproc.db2load ( v_version_number
,'declare cur cursor for select * from NC001.SNMP_MIB'
,'load from cur of cursor modified by norowwarnings insert into NC001.MIB NONRECOVERABLE'
, v_sqlcode
, v_sqlmessage
, v_rows_read
, v_rows_skipped
, v_rows_loaded
, v_rows_rejected
, v_rows_deleted
, v_rows_committed
, v_rows_part_read
, v_rows_part_rejected
, v_rows_part_partitioned
, v_mpp_load_summary
) ;
END;
call sp_test();
select * FROM NC001.MIB;