how to deal with char(1) in datastage

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
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

how to deal with char(1) in datastage

Post by parvathi »

Hi all,
I take data from the oracle table and load in to different table in oracle. Here i have one column from the table which has a data type as char (1 char) and even in the target i have the corresponding column as datatype char(1 char) but when i run the job i get the following error
"value too large for a column actual is 4 maximum is 1" so i changed the data type to varchar. is this way to handle char l datatype
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Looks strange. Will try this out and get back to you

Regards
Sreeni
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check that the column really IS Char(1) in Oracle, not Char(4). Debug the job, and view the actual data values being selected. Does any of them have more than one character? If the error message includes a row number (or if you trap the input row number on the reject-handling link), you can go straight to that row with the debugger. Perhaps you have forgotten to check "first line is column names" and it's the column name that is four characters long?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Ray,

The source here is an Oracle table as per the poster. So I guess its now left with the metadata check and the actual data check.
ray.wurlod wrote:....(or if you trap the input row number on the reject-handling link), you can go straight to that row with the debugger. Perhaps you have forgotten to check "first line is column names" and it's the column name that is four characters long?
Aneesh
vedamurthy
Participant
Posts: 1
Joined: Tue Dec 05, 2006 2:57 am

surrogate key

Post by vedamurthy »

i want to generate a sequence number from 100 , how i can generate it
by vedamurthy
vedamurthy, datastge professional
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Etiquette Note
We do not hijack threads. Your question is unrelated to the topic of this thread. Please choose Post New Topic in the appropriate forum (Server or Parallel).


The answer will be different depending on what job type you are using.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is the datatype perhaps NCHAR? And what is your character encoding in both DS and your database?
nisaumande
Participant
Posts: 13
Joined: Fri Aug 11, 2006 11:57 am
Location: Toulouse, France

Post by nisaumande »

Is the oracle database parameter 'NLS SEMANTICS' set to CHAR ?

I had that case with the nls not activated in Datastage, and the code page of Oracle set to utf8.

So a char(1) in Oracle was considered as a char(4) in Datastage.
(Any char(n) become a char(4n)).

Nicolas
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

Post by parvathi »

nisaumande wrote:Is the oracle database parameter 'NLS SEMANTICS' set to CHAR ?

I had that case with the nls not activated in Datastage, and the code page of Oracle set to utf8.



Nicolas
I have nls setting in the datastage to be Project default (UTF8) in the oracle stage

Is there any difference between the nls settings for all the stages under the proertites headings and the nls settings under the oracle stage

Is it because of nls setting in the oracle stage to beProject default (UTF8)
it is being converted to char(4)

can you please tell e the significance of NLS settings and which NLS settings to be mapped
parvathi
Participant
Posts: 103
Joined: Wed Jul 05, 2006 4:48 am
Contact:

Post by parvathi »

ArndW wrote:Is the datatype perhaps NCHAR? And what is your character encoding in both DS and your database? ...
how can i check what charater encoding is used in the database where as in datastage the NLS charater settings determines the charater encoding if i am right...??
Post Reply