All Forums Tools
ravindrareddy 19 posts Joined 11/06
04 Sep 2009
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?

feinholz 1234 posts Joined 05/08
10 Sep 2009

The first item of importance is to not that the DISPLAY ERRORS and NOSTOP options only workwith 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 bewritten to the standard error output (stderr). You can easily redirect stderr to any file of yourchoice on the MultiLoad command line.

--SteveF

ravindrareddy 19 posts Joined 11/06
16 Sep 2009

Thank You Very Much Steve for the reply...Steve..I tried running the below script through Informaticamload error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.outI though that only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.outBut 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..

ravindrareddy 19 posts Joined 11/06
16 Sep 2009

Thank You Very Much Steve for the reply...Steve..I tried running the below script through Informaticamload /Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.outI though that, only errrored records information will be written onto error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.outBut 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 InputFileLayoutPERSFormat Vartext '|~,|' DISPLAY ERRORS NOSTOPApply 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..

ravindrareddy 19 posts Joined 11/06
16 Sep 2009

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

Jimm 298 posts Joined 09/07
16 Sep 2009

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.outThat 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.

ravindrareddy 19 posts Joined 11/06
16 Sep 2009

Thanks Jimm..It really helped me a lot!!!!

tdstar.rams 11 posts Joined 05/11
24 May 2011

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....

A.raghuram

You must sign in to leave a comment.