All Forums Tools
Anand JP 3 posts Joined 09/06
05 Sep 2006
Loading space into a Decimal(15,2) column

Hi,We are facing issues in loading a text file from a Mainframe system to Teradata database using Mulitload. Here are the details.Problem Description :In the text file that we are loading most of the records has "spaces" instead of packed decimal values for the column/field for which the error is being reported. Mulitload loads the records having columns with proper packed decimal values but rejects records which has spaces with error code 2679.File Format : TextSource Field datatype : Packed decimal (cobol comp3)Target TD Column datatype : Decimal(15,2)Error Message : 2679 The format or data contains a bad characterHas anyone encountered this problem before. Please let me know your comments/suggestions.With Regards,Anand

05 Sep 2006

Anand,Could you add a case statement in the Mload to check for space in the source file and the load only the valid decimal values.

Anand JP 3 posts Joined 09/06
07 Sep 2006

Thanks Feroz,We already tried using CAST also we tried using NULLIF to replace spaces with NULL. The same behaviour is seen

dmac 3 posts Joined 09/06
14 Sep 2006

If all spaces is the only invalid value???? I would think you could define the the input area as both char and decimal. Then use a case statement to check for spaces in the char name and set the target to null or zero if space and otherwise to the decimal column name.

dwhraghav 8 posts Joined 01/07
23 Jan 2007

If I am correctly understanding the problem, then I think you should try using TRIM Leading or Trailing or both

Fred 1096 posts Joined 08/04
23 Jan 2007

You can't use NULLIF function in SQL because that won't be evaluated until after the bad data has been sent to Teradata. Did you try using MLOAD NULLIF processing on the client side, something like this?.FIELD MyFldC 99 CHAR(8);.FIELD MyFldPD 99 DECIMAL(15,2) NULLIF MyFldC = ' ';...INSERT ... VALUES(... :MyFldPD ...);

pvsk 2 posts Joined 10/09
09 Oct 2009

I have to read mainframe binary file which has packed decimal fields comp-3 and binary.How do I achieve this using teradata tpt?

ratchetandclank 49 posts Joined 01/08
19 Feb 2010

I dont know why you selected this topic to post your question. Open up a new topic for your question. also, the information you have provided is very little that you will get help. Post more information like what exactly you are trying to do, what is the data definition in the binary file of mainframe etc.

You must sign in to leave a comment.