I have designed a simple job as below.
Seq File --> Modify --> Seq_File
Seq File :
eno int not null
ename varchar(25) null
sal decimal(16,8) null
my task is to change these fields from "Null" to "Not Null". So i just used modify stage with specification = handle_null(ename,'') & specification = handle_null(sal,0).
I have changed the column nullable property of those two columns as "Nullable = No". I ran the job and verified the output file. I don't see empty space & 0 in the NULL value location.
i have verified the manual and saw the handle_null(columnname,-128)
what is the meaning of -128 here? what i have to do to achieve my requirement?
handle_null()
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-128 is the value with which you replace any null.
This can be represented as a single byte 10000000 (binary) which is also the DataStage internal representation of null.
You need a separate handle_null() specification for each column.
This can be represented as a single byte 10000000 (binary) which is also the DataStage internal representation of null.
You need a separate handle_null() specification for each column.
Last edited by ray.wurlod on Wed May 30, 2012 12:54 am, edited 2 times in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
if i give -128 what value will be applied for ename and sal columns. I mean
i have declared nullable = no for those two columns.
what about 10000000 ? what value will be applied if i use it?
i am not getting this.
handle_null is equivalent to isnull() function (sqlserver, sybase) ?
shall i give handle_null(columnname,'') ?
i have declared nullable = no for those two columns.
what about 10000000 ? what value will be applied if i use it?
i am not getting this.
handle_null is equivalent to isnull() function (sqlserver, sybase) ?
shall i give handle_null(columnname,'') ?
Karthik
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Re: handle_null()
From what you have said you are doing what has to be done, after you have used handle_null() tell us what you are finding in place of NULLs ?karthi_gana wrote:I have changed the column nullable property of those two columns as "Nullable = No". I ran the job and verified the output file. I don't see empty space & 0 in the NULL value location.
- Zulfi
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore