Varchar Field Truncation Issue : Sequential File
Moderators: chulett, rschirm, roy
Varchar Field Truncation Issue : Sequential File
Hi
I am using a comma seperated sequential file as a source. One the columns called "A" in this file has a datatype VARCHAR(30).
The target is database and Column "A" is populating Column "B" of Database.(Size of B: Varchar(30)).
If the length of the incoming field is more than 30, I want to catch that record in to rejected file and continue the processing.
I have tried the option in the sequential File like "Reject Mode"= Output. It is rejected the records for Integer (/ Date Format MisMatch) DataType but not for the varchar datatype.It is reading the Column by truncating the Values.
I changed the datatype to "Char", but then I am not able to read the file.I was searching for the simillar issue in the forum but was not able to find the appropriate.
Can you please guide me on the same?
Thanks
Bob
I am using a comma seperated sequential file as a source. One the columns called "A" in this file has a datatype VARCHAR(30).
The target is database and Column "A" is populating Column "B" of Database.(Size of B: Varchar(30)).
If the length of the incoming field is more than 30, I want to catch that record in to rejected file and continue the processing.
I have tried the option in the sequential File like "Reject Mode"= Output. It is rejected the records for Integer (/ Date Format MisMatch) DataType but not for the varchar datatype.It is reading the Column by truncating the Values.
I changed the datatype to "Char", but then I am not able to read the file.I was searching for the simillar issue in the forum but was not able to find the appropriate.
Can you please guide me on the same?
Thanks
Bob
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Thanks
I have mentioned the column size VARCHAR(30) in sequential File. Also I can view data (with Truncated data) in sequential file.
Both Source and Target has same data type.
Also Can you please let me know which function I can use to check the len of decimal, varchar etc...
Please let me know if you need more information.
Thanks
Bob
I have mentioned the column size VARCHAR(30) in sequential File. Also I can view data (with Truncated data) in sequential file.
Both Source and Target has same data type.
Also Can you please let me know which function I can use to check the len of decimal, varchar etc...
Please let me know if you need more information.
Thanks
Bob
Last edited by bbobpop1 on Fri Mar 13, 2009 8:02 am, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As noted elsewhere (did you Search?) the string requires two extra character positions - one for the sign and one for the decimal placeholder character (unless scale = 0).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi,
Is the issue resolved?
I just went through the following writeup in manual.
See if it helps your case.
" APT_IMPORT_REJECT_STRING_FIELD_OVERRUNS
When set, DataStage will reject any string or ustring fields read that
go over their fixed size. By default these records are truncated. "
Let me know once you try this.
Is the issue resolved?
I just went through the following writeup in manual.
See if it helps your case.
" APT_IMPORT_REJECT_STRING_FIELD_OVERRUNS
When set, DataStage will reject any string or ustring fields read that
go over their fixed size. By default these records are truncated. "
Let me know once you try this.