Can we make a MLOAD script fail when the error tables are created?

Tools
Enthusiast

Can we make a MLOAD script fail when the error tables are created?

Hello everyone,
Can we make a MLOAD script fail when the error tables are created.
Currently the mload scripts exits with a return code = 0 which means loading is successful even though it is not.It has created some error tables which indicate some data has been rejected....

Any help will be appreciated...Thanks in advance
3 REPLIES
Teradata Employee

Re: Can we make a MLOAD script fail when the error tables are created?

Try this - sets the RC to the max rc + uv + et + reject count

.logoff &SYSUVCNT + &SYSRJCTCNT + &SYSETCNT + &SYSRC;

Enthusiast

Re: Can we make a MLOAD script fail when the error tables are created?

Thanks Jeff...Can you please give me more details..I am new to Teradata...

Where can we set these pre-defined system variables in the mload script?
Is it possible to assign values to these variables i.e one variable which represents data for error table 1 and one variable for error table 2?

It would be great if you could provide me those details

Appreciate your help...

Enthusiast

Re: Can we make a MLOAD script fail when the error tables are created?

Thanks jeff.,

I tried out the following and it worked

.IF &SYSETCNT1 > 0 THEN ;
.LOGOFF 12;
.ELSE;
.IF &SYSUVCNT1 > 0 THEN;
.LOGOFF 12;
.ENDIF;
.ENDIF;

Appreciate for all the help