Remove Warnings while populating sequential files

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

sampitke1
Participant
Posts: 24
Joined: Mon Apr 28, 2008 4:22 pm

Remove Warnings while populating sequential files

Post 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
Last edited by sampitke1 on Mon Jul 14, 2008 8:35 am, edited 1 time in total.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
sampitke1
Participant
Posts: 24
Joined: Mon Apr 28, 2008 4:22 pm

Remove Warnings while populating sequential files

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You used the 'following code' where?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sampitke1
Participant
Posts: 24
Joined: Mon Apr 28, 2008 4:22 pm

Remove Warnings while populating sequential files

Post by sampitke1 »

I used the code in the transformer. In the Column Derivation of XXXX column.


Thanks
Sameer
girija
Participant
Posts: 89
Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford

Re: Remove Warnings while populating sequential files

Post 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.
sampitke1
Participant
Posts: 24
Joined: Mon Apr 28, 2008 4:22 pm

Re: Remove Warnings while populating sequential files

Post 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."
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post 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.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: Remove Warnings while populating sequential files

Post 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() ???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post 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.
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Post by xch2005 »

Try to have the null field value=''
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post 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..
ambasta
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post 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..
ambasta
nani0907
Participant
Posts: 155
Joined: Wed Apr 18, 2007 10:30 am

Change the datatype of seq file

Post 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 ="
thanks n regards
nani
Post Reply