Handling special characters

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
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Does it give out any error or warning messages? I was able to successfully insert it into Oracle in the past.
Kris

Where's the "Any" key?-Homer Simpson
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

try changing "contains terminator" to yes.

this can be done bi right clicking each column and choosing yes from "contains terminator" box

do this for all varchar columns and check if it makes a difference.

If this does not work try and identify the character which is causing the error. Presense of '?' should not disrupt the flow.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Ok..
Do you want to store such special characters in the database?
What is your database character set?
Is it capable of storing such special characters?
We had situations where we wanted to store some non printable characters in the database so we changed our
oracle database character set from WE8ISO8859P1 to WE8MSWIN1252.

HTH
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

I do not think so there should be a problem while inserting special characters in oracle DB but the job mau show warnings becuase of the NLS settings of that particuar job.

I think changing the NLS setting for that particular job will yield positive results.
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Post by vsi »

narasimha,
Where i can check for database characterset?

Thanks
vsi
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

you cannot ignore termination for the last column.

is the problem in last row? is this actually a '?' or any other character? if it is un necessary can you strip your records of it?
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Post by vsi »

DeepakCorning,

unfortunately i dont have rights to change the NLS Settings. :(

Thanks
vsi
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

but what exactly is it set to?

still i dont think there is any NLS setting which does not recognise a '?'
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

As far as I know it the special chracter in the data is not '?' but it is something else. As the job is not able to handle it it changes the special character in a '?'.

Depending on what special character it is you can chaneg the NLS settings in the job and then it will handle the special character till end.

Are you getting an "ORA" error or a normal error? This will clearly tell us that it is at the DB level or job level.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

If you have oracle client installed, then check if NLS_LANG is set in the registery

In your SQL Plus prompt type

Code: Select all

SQL> @.[%NLS_LANG%].

If you get something like:
unable to open file ".[AMERICA_AMERICA.WE8MSWIN1252]."
the "file name" between the '[]' is the value of the registry parameter.

Could you please post the warning message you are getting
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Vsi,
If you are not sure about the data, check with the concern person and try to replace or delete the record.But most of the times this happens because of NLS settings..and special character gets rejected in oracle database...Try checking by setting the contain terminator to yes for the row...If you get a problem:"Column Description cannot contain a non-quoted terminator " then try to check as Kris007 suggested.....
vsi wrote:
i can strip this character. but i am not always sure,that this is the character which i receive from Source.

seems the record is corrupted.

somehow,the record should be inserted as it is..

is it possible? :)

If it is the only character,i can use Ereplace to ignore this character.
but i am not sure, the souce may contain only this character. :(
pkomalla
Premium Member
Premium Member
Posts: 44
Joined: Tue Mar 21, 2006 6:18 pm

Post by pkomalla »

You can use

Iconv(Iconv(coulmnname, "MCA"),"MCN") to get only alphabetic and numerical values from the column and avoid all other.
pkomalla
Premium Member
Premium Member
Posts: 44
Joined: Tue Mar 21, 2006 6:18 pm

Post by pkomalla »

You can use

Iconv(columnname,"MCA"),"MCN") which gives data containing only alphabets and numerics, all other or removed
Post Reply