CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

Tools
Enthusiast

CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

Hi ALL,

While loading data from flat file to Teradata table using MLOAD,few records has bad data.Due to these records MLOAD got failed and this data hasn't been captured in ET tables.
So I have used "DISPLAY ERRORS NOSTOP" command to make sure that MLOAD get completes without fail.But I want to write such bad records into a file for furthur investigation.

Can someone help me in acheiving this task please?

7 REPLIES
Teradata Employee

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

The first item of importance is to not that the DISPLAY ERRORS and NOSTOP options only work
with VARTEXT records. It will not work with the binary formats.

Next, the DISPLAY ERRORS option will indicate to MultiLoad that the rows in error should be
written to the standard error output (stderr). You can easily redirect stderr to any file of your
choice on the MultiLoad command line.

-- SteveF
Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

Thank You Very Much Steve for the reply...

Steve..

I tried running the below script through Informatica

mload error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

I though that only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

But entire loader log has been written onto this file.

Please find my import section of the MLOAD script as below...

.Import Infile '/Informatica/TgtFiles/teis_crmc_pers_nm_cust.out'
Layout InputFileLayoutPERS
Format Vartext '|~,|' DISPLAY ERRORS NOSTOP
Apply tagDMLPERS
;

Could you please let me know how can I write these errored records into a file instead of writing onto the standard output...

Where can I make the change in the script to accomplish this...

Thanks In Advance..
Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

Thank You Very Much Steve for the reply...

Steve..

I tried running the below script through Informatica

mload /Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

I though that, only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

But entire loader log has been written onto this file.

Please find my import section of the MLOAD script as below...

.Import Infile '/Informatica/TgtFiles/teis_crmc_pers_nm_cust.out'
Layout InputFileLayoutPERS
Format Vartext '|~,|' DISPLAY ERRORS NOSTOP
Apply tagDMLPERS
;

Could you please let me know how can I write these errored records into a file instead of writing onto the standard output...

Where can I make the change in the script to accomplish this...

Thanks In Advance..

Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

I got the solution to write the error messages to a file..

But what I am looking for is...

Can I write the errored records into a file?

Thanks In Advance
Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

DISPLAY ERRORS writes the error records to syserr.
Your command redirected sysout, not syserr.

Use:

mload 2>/Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.out

That should write sysout to its normal destination, but will write ALL the errors - error messages and error records to syserr.
You should be able to sed the file to redirect/ remove error messages if you need to.

Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

Thanks Jimm..

It really helped me a lot!!!!

Enthusiast

Re: CAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?

By writing this command Format Vartext '|~,|' DISPLAY ERRORS NOSTOP,
V can store all the errors records in a table ??
please give clear idea
Thank you....