Non Printable characters loaded to Oracle from Sybase

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
clmhwyfe
Premium Member
Premium Member
Posts: 42
Joined: Mon Jun 18, 2012 1:39 pm

Non Printable characters loaded to Oracle from Sybase

Post by clmhwyfe »

Hi all,

Am working on a job that extracts data from Sybase tables and loads to Oracle tables.

There is a column in Sybase that has user inputted values which contains some non printable characters. Initially I got the error
No default type conversion from type "raw[max=100]" to type "string[max=100]".

So I read the column as VarBinary and used the RawtoString function to convert it to a VARCHAR to load to Oracle

This loads non printable characters (?,^@,New line) in the oracle tables and thats not consistant with the Sybase data,

Is there a way to remove those characters using any of the NLS settings or by any other means, the business doesnt want the data extratced to a file and have some unix command (tr or sed) run on them
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think you need to investigate the Sybase data a bit more thoroughly. DataStage can't "invent" data values. For example, are there any newline characters in these raw data? You could check using a Transformer stage.

Incidentally, ^@ is a representation of ASCII NUL, often used as a terminator of a string (for example in C programming), also sometimes represented as 0x00 or \0. In DataStage you can represent it as Char(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.
clmhwyfe
Premium Member
Premium Member
Posts: 42
Joined: Mon Jun 18, 2012 1:39 pm

Post by clmhwyfe »

Thanks Ray,

There are new line characters in the data , for example when i view the data in the table

1
2 Coverage:PPO/M/RX

1 and 2 specify the line numbers , So there is a 'Return' at Line 1

when I view the data in the Sybase table it shows without the 'Return'

1 Coverage:PPO/M/RX
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Maybe Sybase suppresses it. You need some way to look at the data in raw format. Try getting a CSV dump of the record from Sybase.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply