Multiload pre-Begin Mload Target Table DELETE ALL


Multiload pre-Begin Mload Target Table DELETE ALL

I recently ran across an MLOAD Script that, prior to the BEGIN MLOAD, contained the standard set of DROP Work/ET/UV table statements along with an


all inside the Mload script, and all prior to the BEGIN MLOAD statement.

Normally, I would have placed all these statements inside a BTEQ script with error checking flow control prior to executing the MLOAD.

Observation: It appears that the DELETE FROM TABLENAME ALL; executing inside the MLoad prior to the Begin Mload statement is performing a standard DELETE FROM TABLENAME; which therefore, appears to be creating rows in the transient journal instead of simply marking the table header(s) as empty ( no rows ).

Any thoughts on this one?


Re: Multiload pre-Begin Mload Target Table DELETE ALL

Hi bc,
dropping/deleting tables or doing housekeeping sql before the .begin mload statement is permitted in a MLD thanks to the support environment that is a special environment that allows you to execute some sql between the .logon and the .begin statements.

I would prefer performing the cleansing of your tables in the mld script rather than in a separate btq.

Observation: if you run a delete from tablename all before the .begin mload statement, NO TRANSIENT JOURNAL is used. In fact, the statements performad useing the support environment don't use support environment, that is, you cannot rollback a failed sql.

Hope this helps,