|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/2/2006 1:40:00 AM
Posts: 3,
Visits: 1
|
|
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 : Text Source Field datatype : Packed decimal (cobol comp3) Target TD Column datatype : Decimal(15,2) Error Message : 2679 The format or data contains a bad character
Has anyone encountered this problem before.
Please let me know your comments/suggestions.
With Regards, Anand
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/7/2008 12:54:51 PM
Posts: 116,
Visits: 20
|
|
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.
Feroz Shaik
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/2/2006 1:40:00 AM
Posts: 3,
Visits: 1
|
|
Thanks Feroz,
We already tried using CAST also we tried using NULLIF to replace spaces with NULL. The same behaviour is seen
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/3/2006 9:40:00 AM
Posts: 3,
Visits: 1
|
|
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.
Dave
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/14/2007 2:28:00 AM
Posts: 7,
Visits: 1
|
|
If I am correctly understanding the problem, then I think you should try using TRIM Leading or Trailing or both
_________ / Regards, \ /____________\ | Raghav | |___________|
|
|
|
|
|
Supreme Being
      
Group: PAC and SFT Members
Last Login: Today @ 1:10:32 AM
Posts: 312,
Visits: 430
|
|
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 ...);
|
|
|
|