Page 1 of 1

Unable to understand Datastage Director Warning

Posted: Sun Mar 29, 2009 12:20 am
by udayk_2007
Hi

I am getting following warning in Director Log

FileName: When checking operator: When validating export schema:
At field "Column_ABCD": "null_field" length (0) must match field's fixed width (40)

Can anybody please suggest how can i get rid of this warning

Thanks in advance

Posted: Sun Mar 29, 2009 12:55 am
by ray.wurlod
A Search would have garnered your answer faster. Your data type is Char(40), therefore ANY value, whether or not that value represents NULL, must contain forty characters. The Null Field Value property contains a value that will be interpreted as NULL on reading or be written if NULL is received into the writing stage when writing. Since the column is of data type Char(40) (string[40]) the Null Field Value must contain 40 characters.

Posted: Sun Mar 29, 2009 1:38 am
by udayk_2007
Hi

Thanks for your response

Actually i was getting that warning for reject files

now i have put 40 spaces in the null field value of those columns and the warning got resolved.

Posted: Sun Mar 29, 2009 1:52 am
by naveen19
Hi,

Try to use below below logic.. putting 40 spaces is not good for the design

If IsNull(column_name) Then '0' Else If Len(TrimB(column_name)) =0 Then '0' Else column_name

Regards...Naveen.K

Posted: Sun Mar 29, 2009 2:38 am
by udayk_2007
you are correct..putting 40 spaces is not the perfect solution ,its just a workaround to reduce warnings

your logic can be implemented in this case but it will require a transformer to put that code,which will hamper the job performance

Anyways...Thanks for your help

Posted: Sun Mar 29, 2009 7:39 am
by chulett
I'm curious how that is "not good for the design". Or how putting a zero in a CHAR(40) is an appropriate represention of an empty string field. :?

In my opinion, what you did is not a workaround but rather the solution. The fact that the warning is now gone should be a big clue, a 'workaround' would involve something like using a message handler to to demote it. Regardless, please mark the thread with the outcome of your choice using the buttons at the top of the screen.

Thanks.