CALL Failed. 3706: MLOAD_CLEANUP:

General
General covers Articles, Reference documentation, FAQs, Downloads and Blogs that do not belong to a specific subject area. General-purpose Articles about everything and anything

CALL Failed. 3706: MLOAD_CLEANUP:

HELLO,

 

While calling below procedure 

call SAI_OPERATIONS.MLOAD_CLEANUP ('SAI_OPERATIONS','main','SAI_OPERATIONS','worktable','SAI_OPERATIONS','errortable','SAI_OPERATIONS','errortable2','SAI_OPERATIONS','logtable');

 

 I'm getting this error  CALL Failed. 3706:  MLOAD_CLEANUP:Syntax error: expected something between ';' and the word 'SAI_OPERATIONS'. 

 

 

Replace PROCEDURE SAI_OPERATIONS.MLOAD_CLEANUP (
IN DB_NM VARCHAR(30), -- DB that holds tables being created.
IN TBL_NM VARCHAR(30), -- Table name.
IN DB_NM_WT VARCHAR(30), -- WORK TABLE DB.
IN TBL_NM_WT VARCHAR(30), -- work Table name.
IN DB_NM_ERR VARCHAR(30), --ERROR TABLE DB.
IN TBL_NM_ET VARCHAR(30), -- ET Table name.
IN TBL_NM_UV VARCHAR(30), -- UV Table name.
IN DB_NM_LOG VARCHAR(30), --LOG TABLE DB.
IN TBL_NM_LOG VARCHAR(30) -- LOG Table name.
)

MAIN:
BEGIN

DECLARE SQL_TXT VARCHAR(150) DEFAULT 'RELEASE MLOAD ';
DECLARE SQL_TXT1 VARCHAR(150) DEFAULT 'DROP TABLE';
DECLARE SQL_TXT2 VARCHAR(150) DEFAULT 'DROP TABLE';
DECLARE SQL_TXT3 VARCHAR(150) DEFAULT 'DROP TABLE';
DECLARE SQL_TXT4 VARCHAR(150) DEFAULT 'DROP TABLE';

SET SQL_TXT=SQL_TXT || TRIM(DB_NM) || '.' || TRIM(TBL_NM) || ' ' || 'IN APPLY' || ';';
SET SQL_TXT=SQL_TXT || TRIM(DB_NM) || '.' || TRIM(TBL_NM) || ';';
SET SQL_TXT1=SQL_TXT1 || TRIM(DB_NM_WT) || '.' || TRIM(TBL_NM_WT) || ';';
SET SQL_TXT2=SQL_TXT2 || TRIM(DB_NM_ERR) || '.' || TRIM(TBL_NM_ET) || ';';
SET SQL_TXT3=SQL_TXT3 || TRIM(DB_NM_ERR) || '.' || TRIM(TBL_NM_UV) || ';';
SET SQL_TXT4=SQL_TXT4 || TRIM(DB_NM_LOG) || '.' || TRIM(TBL_NM_LOG) || ';';

CALL DBC.SysExecSQL(SQL_TXT);
CALL DBC.SysExecSQL(SQL_TXT1);
CALL DBC.SysExecSQL(SQL_TXT2);
CALL DBC.SysExecSQL(SQL_TXT3);
CALL DBC.SysExecSQL(SQL_TXT4);


END MAIN
;

1 REPLY
N/A

Re: CALL Failed. 3706: MLOAD_CLEANUP:

You concat a semicolon in the middle of SQL_TXT.