Page 1 of 2

Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 8:27 am
by sampitke1
I am populating sequential file from database using single transformations . While populating the XXXX field i am facing following warning.:
[i]When checking operator: When binding output interface field "xxxx" to field "xxxx": Converting a nullable source to a non-nullable result;[/i]

I tried option like Make the nullable field to yes for both source and taret. Added is null check like IF ISNULL(XXXX) then XXXX ELSE XXXX. (Just to avoid the warning)

Can you please let me know how can I remove the warning?

Thanks and Regards
Sameer

Posted: Mon Jul 14, 2008 8:34 am
by ArndW
This warning should disappear when you code an explicit null handling into the transform or modify stage. Are you certain the warning did not go away when you tried this?

Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 8:41 am
by sampitke1
Thanks for your reply. However

I used following code for null handling.

1) If IsNull(XXXX) Then XXXX Else '000000000' : Warning is still there
2) If IsNull(XXXX) Then XXXX Else XXXX : Warning is still there.

Target is fixedwidth file.

Thanks
Sameer

Posted: Mon Jul 14, 2008 8:42 am
by chulett
You used the 'following code' where?

Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 8:56 am
by sampitke1
I used the code in the transformer. In the Column Derivation of XXXX column.


Thanks
Sameer

Re: Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 8:57 am
by girija
1. Open the prooerties tab of the seq file
2. Go to Input --> columns tab
3. You see the field # assigned for each field
4. Double click on the field # and set the null value


I hope it will resolve the issue.

Re: Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 10:43 am
by sampitke1
Nullable status for all the fields is "No".
Still I am facing the warning. "When checking operator: When binding output interface field "XXXX" to field "XXXX": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted."

Posted: Mon Jul 14, 2008 12:48 pm
by throbinson
Nullable status for all fields is NOT No. At least one: "XXXX" is defined in the database as NULLABLE. Your job column metadata should match the DDL of the database table. The Table will override your job metadata, hence the warning. Further just because you hand code an IF statement doesn't mean Datastage is smart enough to realize that the field can't be NULL. DataStage trusts the metadata and the Modify stage. Use them.

Re: Remove Warnings while populating sequential files

Posted: Mon Jul 14, 2008 12:53 pm
by DSguru2B
sampitke1 wrote:Thanks for your reply. However

I used following code for null handling.

1) If IsNull(XXXX) Then XXXX Else '000000000' : Warning is still there
2) If IsNull(XXXX) Then XXXX Else XXXX : Warning is still there.

Target is fixedwidth file.

Thanks
Sameer
With the first code, arent you supposed to use IsNotNull() ???

Posted: Tue Jul 15, 2008 5:09 pm
by ShaneMuir
I am not sure in v7 but in v8 you would set a default null field value on the format tab of the sequential file stage.
Or right click the columns in question and edit row and set a nullable value there.

Posted: Fri Sep 19, 2008 9:49 am
by xch2005
Try to have the null field value=''

Posted: Fri Sep 19, 2008 3:50 pm
by ray.wurlod
Make both the input field and the output field Nullable. This is the right thing to do if they're going to have null in them.

Posted: Fri Sep 19, 2008 10:00 pm
by ambasta
You can do the null handling at column level.Go to column meta data double click on the number ..it will pop up another window..there you will have to explicitly define the value in pace of null...Do it by selecting Null Field value = ' ' ...The number of spaces will be the same as the length of your field. I hope it will resolve the issue :)

Thanks..

Posted: Fri Sep 19, 2008 10:02 pm
by ambasta
You can do the null handling at column level.Go to column meta data double click on the number ..it will pop up another window..there you will have to explicitly define the value in pace of null...Do it by selecting Null Field value = ' ' ...The number of spaces will be the same as the length of your field. I hope it will resolve the issue :)

Thanks..

Change the datatype of seq file

Posted: Fri Sep 26, 2008 9:02 am
by nani0907
Even I have faced the same error.
From the transformer,I was populating the records into seq file.
So in the output tab,I have changed the char and date data type to varchar.
Definetly this will resolve ur warning,and one more thing In seq file input/format mention null field value ="