Error in setOutputFieldAsString()

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
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Error in setOutputFieldAsString()

Post by nghadi »

I'm getting following error when I try to load data from one sql server table to another sql server table. Field 7 is line_1_addr varchar(50). Any ideas why i'm getting this error? Thanks in advance.

Error: Field type must be string in order to call setOutputFieldAsString() for field '7' in output dataset '0'.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is field 8? Remember that numbering is zero-based. 0,1,2,3,4,5,6,7
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Post by nghadi »

8th field is line_2_addr varchar(50).
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In that case it's a bit of a mystery. Can you please post the entire error message (double click the log entry to get detail view)? This will contain the stage and link name where the error was generated.
Check both input and output links to ensure that no non-string data type has been specified.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nghadi
Participant
Posts: 7
Joined: Mon Mar 28, 2005 12:59 pm

Post by nghadi »

Well, I deleted unicode from extended column in column tab and now i'm not getting this error. I don't understand what is unicode and when to use it?
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Unicode is usually added to your metadata if you have a NLS setup, and does not toggle off the Char -> Unicode option when you import metadata to the job.

Obviously, your SQL server is not NLS enabled. I am not quite sure how to enable it without doing some hard core Googling.

Anyone else know here?
Post Reply