Truncate Issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Truncate Issue

Post by sam334 »

Hi, I have an issue which is giving me a lot of trouble.So, seek your help. I have a server job which inserts and updates new records for the employees who are newly recruited and moved to different department.
It looks like,

FTP stage- Transformer- Transformer-ODBC. (Second transformer is referenced with the same target table for update).

Now, each time I am getting the error Data is truncated.
DSD.BCIPut call to function SQLExecute returned informational message.
SQLSTATE=01004, DBMS.CODE=0
[DataStage][SQL Client]Data has been truncated

The length of the columns in target table is quite large as we get different length of userid and login name and address. There is no way the source data is larger than the mentioned column length.


Any help.

Thanks.Appreciate it.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

NLS issue? Meaning, are you dealing with a multibyte character set?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Craig,
No, I am not.

Code: Select all

USERID = "kashmirakumar.basu           "
FIRST_NM = "Kashmera                    "
LAST_NM = "Basukumara                    "
This is the sample of error.. there are spaces between the last quote and last word

Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you tried trimming the values before sending them to the target?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Craig ,
I used, TRIM, SUBSTRING. Any other possible function can I use.

Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Let's get some specifics before we play anymore guessing games. Show us the definitions of your target fields: name, data type, precision. Saying they are 'quite large' doesn't exactly narrow it down. :wink:

I'd also be curious what their definitions are in the job itself.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ODBC specifies an upper limit on the size of buffers that can be transmitted. From memory it is something like 8KB per row.

These defaults can be overridden in the uvodbc.config file. From memory the descriptor names have the form MAX...BUFF (you can Search DSXchange for the actual names).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I'd also recommend dumping the data out and looking at it in a Hex editor. We had the same problem last week and it turns out the "blanks" weren't regular spaces, they were "non-breaking spaces", a Windows special character that indicates "don't put a line break here". Someone had cut and pasted the contents from a Word document into an application.

When DataStage sent the fields with the special characters to the database they were converted into multi-byte representations and the records rejected due to "value exceeds maximum length" errors. Trim also won't remove them (it isn't a "space" though it looks like one).

Note: A true "space" is a Hex 20.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Thanks Ray and Andy.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, sizes look 'fine'... time to check things out as Andy noted.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Yes Craig. I dumped the data in a sequential file in text format. Seems like there are some issues. Let me check. I will get back asap.
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Hi All,
I followed the way of dumping the data in txt format and then load it. There were some issues regarding the suffix. It is clear now.

Thanks a lot everyone.
Post Reply